Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add STEP_TP_CONSUMED modifier, apply item mods #4571

Merged
merged 1 commit into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scripts/enum/mod.lua
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,8 @@ xi.mod =
DIG_BYPASS_FATIGUE = 1074, -- Chocobo digging modifier found in "Blue Race Silks". Modifier works as a direct percent.
BREATH_DMG_DEALT = 1075, -- Breath damage dealt

STEP_TP_CONSUMED = 1077, -- Modifies the amount of TP consumed by dancer steps

-- IF YOU ADD ANY NEW MODIFIER HERE, ADD IT IN src/map/modifier.h ASWELL!

-- The spares take care of finding the next ID to use so long as we don't forget to list IDs that have been freed up by refactoring.
Expand Down
3 changes: 2 additions & 1 deletion scripts/globals/job_utils/dancer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ xi.job_utils.dancer.checkStepAbility = function(player, target, ability)
if player:hasStatusEffect(xi.effect.TRANCE) then
return 0, 0
elseif player:getTP() < 100 then
-- TODO: Does Step TP Consumed modifier adjust this check?
return xi.msg.basic.NOT_ENOUGH_TP, 0
else
return 0, 0
Expand Down Expand Up @@ -237,7 +238,7 @@ xi.job_utils.dancer.useStepAbility = function(player, target, ability, action, s

-- Only remove TP if the player doesn't have Trance.
if not player:hasStatusEffect(xi.effect.TRANCE) then
player:delTP(100)
player:delTP(100 + player:getMod(xi.mod.STEP_TP_CONSUMED))
end

if math.random() <= xi.weaponskills.getHitRate(player, target, true, player:getMod(xi.mod.STEP_ACCURACY)) then
Expand Down
36 changes: 18 additions & 18 deletions sql/item_mods.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43886,28 +43886,28 @@ INSERT INTO `item_mods` VALUES (21581,30,50); -- MACC: 50
INSERT INTO `item_mods` VALUES (21581,311,217); -- MAGIC_DAMAGE: 217

-- Etoile Knife
INSERT INTO `item_mods` VALUES (21582,2,130); -- HP: 130
INSERT INTO `item_mods` VALUES (21582,25,30); -- ACC: 30
INSERT INTO `item_mods` VALUES (21582,26,30); -- RACC: 30
INSERT INTO `item_mods` VALUES (21582,30,30); -- MACC: 30
INSERT INTO `item_mods` VALUES (21582,311,186); -- MAGIC_DAMAGE: 186
-- TODO: "Step" TP consumed -20
INSERT INTO `item_mods` VALUES (21582,2,130); -- HP: 130
INSERT INTO `item_mods` VALUES (21582,25,30); -- ACC: 30
INSERT INTO `item_mods` VALUES (21582,26,30); -- RACC: 30
INSERT INTO `item_mods` VALUES (21582,30,30); -- MACC: 30
INSERT INTO `item_mods` VALUES (21582,311,186); -- MAGIC_DAMAGE: 186
INSERT INTO `item_mods` VALUES (21582,1077,-20); -- STEP_TP_CONSUMED: -20

-- Horos Knife
INSERT INTO `item_mods` VALUES (21583,2,140); -- HP: 140
INSERT INTO `item_mods` VALUES (21583,25,40); -- ACC: 40
INSERT INTO `item_mods` VALUES (21583,26,40); -- RACC: 40
INSERT INTO `item_mods` VALUES (21583,30,40); -- MACC: 40
INSERT INTO `item_mods` VALUES (21583,311,201); -- MAGIC_DAMAGE: 201
-- TODO: "Step" TP consumed -30
INSERT INTO `item_mods` VALUES (21583,2,140); -- HP: 140
INSERT INTO `item_mods` VALUES (21583,25,40); -- ACC: 40
INSERT INTO `item_mods` VALUES (21583,26,40); -- RACC: 40
INSERT INTO `item_mods` VALUES (21583,30,40); -- MACC: 40
INSERT INTO `item_mods` VALUES (21583,311,201); -- MAGIC_DAMAGE: 201
INSERT INTO `item_mods` VALUES (21583,1077,-30); -- STEP_TP_CONSUMED: -30

-- Setan Kober
INSERT INTO `item_mods` VALUES (21584,2,150); -- HP: 150
INSERT INTO `item_mods` VALUES (21584,25,50); -- ACC: 50
INSERT INTO `item_mods` VALUES (21584,26,50); -- RACC: 50
INSERT INTO `item_mods` VALUES (21584,30,50); -- MACC: 50
INSERT INTO `item_mods` VALUES (21584,311,217); -- MAGIC_DAMAGE: 217
-- TODO: "Step" TP consumed -40
INSERT INTO `item_mods` VALUES (21584,2,150); -- HP: 150
INSERT INTO `item_mods` VALUES (21584,25,50); -- ACC: 50
INSERT INTO `item_mods` VALUES (21584,26,50); -- RACC: 50
INSERT INTO `item_mods` VALUES (21584,30,50); -- MACC: 50
INSERT INTO `item_mods` VALUES (21584,311,217); -- MAGIC_DAMAGE: 217
INSERT INTO `item_mods` VALUES (21584,1077,-40); -- STEP_TP_CONSUMED: -40

-- Crepuscular Knife
INSERT INTO `item_mods` VALUES (21585,9,15); -- DEX: 15
Expand Down
25 changes: 13 additions & 12 deletions src/map/modifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -621,17 +621,18 @@ enum class Mod
AUTOMATON_LVL_BONUS = 1044, // Automaton: Lv. (Increases automaton's base level above 99)

// Dancer
FINISHING_MOVES = 333, // Tracks # of finishing moves
SAMBA_DURATION = 490, // Samba duration bonus
WALTZ_POTENCY = 491, // Waltz Potency Bonus
JIG_DURATION = 492, // Jig duration bonus in percents
VFLOURISH_MACC = 493, // Violent Flourish accuracy bonus
STEP_FINISH = 494, // Bonus finishing moves from steps
STEP_ACCURACY = 403, // Bonus accuracy for Dancer's steps
WALTZ_DELAY = 497, // Waltz Ability Delay modifier (-1 mod is -1 second)
SAMBA_PDURATION = 498, // Samba percent duration bonus
REVERSE_FLOURISH_EFFECT = 836, // Reverse Flourish effect in tenths of squared term multiplier
MAX_FINISHING_MOVE_BONUS = 988, // Increases the maximum number of finishing moves that may be stored
FINISHING_MOVES = 333, // Tracks # of finishing moves
SAMBA_DURATION = 490, // Samba duration bonus
WALTZ_POTENCY = 491, // Waltz Potency Bonus
JIG_DURATION = 492, // Jig duration bonus in percents
VFLOURISH_MACC = 493, // Violent Flourish accuracy bonus
STEP_FINISH = 494, // Bonus finishing moves from steps
STEP_ACCURACY = 403, // Bonus accuracy for Dancer's steps
WALTZ_DELAY = 497, // Waltz Ability Delay modifier (-1 mod is -1 second)
SAMBA_PDURATION = 498, // Samba percent duration bonus
REVERSE_FLOURISH_EFFECT = 836, // Reverse Flourish effect in tenths of squared term multiplier
MAX_FINISHING_MOVE_BONUS = 988, // Increases the maximum number of finishing moves that may be stored
STEP_TP_CONSUMED = 1077, // Modifies the amount of TP consumed when using steps

// Scholar
BLACK_MAGIC_COST = 393, // MP cost for black magic (light/dark arts)
Expand Down Expand Up @@ -986,7 +987,7 @@ enum class Mod
// 217 to 223
// 271 to 280
//
// SPARE = 1077 and onward
// SPARE = 1078 and onward
};

// temporary workaround for using enum class as unordered_map key until compilers support it
Expand Down