Skip to content

Commit

Permalink
Command 9995 : Add the possibility to get %Cost instead of MP Cost
Browse files Browse the repository at this point in the history
Params :
isVariable? ; skillID ; isVariable? ; variable ID ; Percentage?
  • Loading branch information
MackValentine committed May 4, 2024
1 parent 34a0f56 commit 6407f21
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/game_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5200,6 +5200,9 @@ bool Game_Interpreter::CommandGetSkillMPCost(lcf::rpg::EventCommand const& com)
}

int mpCost = skill->sp_cost;
if (com.parameters.size() > 4)
if (com.parameters[4] == 1)
mpCost = skill->sp_percent;
// Output::Debug("CommandGetSkillMPCost {} {} {}", skillID, result, mpCost);

Main_Data::game_variables->Set(result, mpCost);
Expand Down

0 comments on commit 6407f21

Please sign in to comment.