-
Notifications
You must be signed in to change notification settings - Fork 186
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
Conditions in Battles #815
Conversation
GainMoneyMessage only shown if money >0
int hp = state.hp_change_val; | ||
int sp = state.sp_change_val; | ||
int source_hp = source->GetHp(); | ||
int source_sp = source->GetSp(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stray spaces detected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed
Jenkins: Test this please |
One reason speaking against ::Apply is that under RPG2k3 all actors get damage at the begin of a battle action (doesn't matter if ally or enemy). With Apply only the current one doing the action gets damage. I suggest moving this to a function in Game_Battler and when invoking that function it directly alters SP and MP of that Battler. For RPG2k you can place the call in ... maybe BattleActionState_ConditionHeal (for the FirstAttack case) So for RPG2k3 I suggest placing the call to this function (and displaying the damage number (for HP only!) as a floating number) in the BattleActionState_Start for the "IsFirstAttack" case. The RPG2k3 battle system also shows that damaging due to states happens before the action is executed. |
git commit --amend failed again 👎 |
git reset HEAD~1 :D should work Because you use Windows you should consider tortoise git |
RPG_RT2k3 should show damage numbers now
Jenkins: Test this please |
@@ -532,6 +532,15 @@ bool Scene_Battle_Rpg2k3::ProcessBattleAction(Game_BattleAlgorithm::AlgorithmBas | |||
|
|||
if (action->IsFirstAttack() && action->GetStartSe()) { | |||
Game_System::SePlay(*action->GetStartSe()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The damageTaken codepath depends on action->GetStartSe()
Test case for RPG Maker 2003 (add a RPG_RT.exe): Command Line for Player: "BattleTest 2" |
Test case for RPG Maker 2000 |
return false; | ||
} | ||
|
||
// Reset variables | ||
battle_action_state = BattleActionState_Start; | ||
battle_action_state = BattleActionState_ConditionHeal; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You changed all the battle_action_state
transitions. This is super super risky, pls don't do this unless you are 100% certain this is required. Because this must be tested with every available battle action available (Normal, different items, different skills, defend) to proof that it doesn't break anything or added a subtil bug.
One problem I already noticed is, that you introduced some delay before everybodys turn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah i needed to change them to get poisen effect working before the battlers attack.
think need to double check, if waiting is needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reverted all the state changes and I only took your code from line 370 to 388 and it still works fine for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so it shows conditioneffct, Clean enemyAttacks, Damage clean to you?
Takes me 2h yesterday to get it shown correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my tests your state changes broke the message box. At the beginning it shows an empty message box with a delay and between battle actions, too.
And after an enemy finished his battle animation the delay got removed.
RPG2k Message Delay fixed Cleanup ConditionApply() and fixed damage calculation
The delay is still wrong here. Normal attacks without any states have a 30 frame delay before anything happens -> Must be 0. And after battle animations the feedback is now instant instead of a delay. (After showing the attack animation, e.g. the sword slash, the old version had a 30 frame delay). And sometimes enemy attacks give me now a negative amount and heal me :O |
I think it should work as expected now |
I will prepare an emscripten test case for both battle systems this evening. But I think you are getting closer now :D |
Needs |
fix another timing error
Jenkins: Test this please @fdelapena Maybe we should whitelist him ;) |
See this on your Emscripten Testcase first time |
Done!
Yeah, Ghabry commented on IRC this also happens with the current upstream master version. |
but i messed up dead enemys in rpg2k3 :D if they are dead they get 1hp ^^ |
Okay, looks fine now. The negative HP after attacks and poison are strange but this already happens in Master... :(. |
The problem for that "-5" is the skill damage code in We need a "effect < 0 -> = 0" check before the line with rand(). |
Conditions are applied to battle_actors now.
GainMoneyMessage only shown if money >0
I only tested it with rpg Maker 2k but should work on 2k3...