I'm looking to make a skill that does the most damage if it's the initial battle turn, then normal damage after that. What I'm wondering is if there is a variable related to the turn number that I can plug into the damage formula box.
Damage based on number of turns in battle
RGSS3 Script Requests$game_troop.turn_count might be useful in the damage formula in your case 🙂
Absolutely no idea, but the closest example I can think of is the move "Fake Out" in Pokemon which works (hits first and causes the opponent to flinch) if used in the first turn of the battle and fails if used after that.
Commenting partly to start "following" this thread so I can see if anyone else knows.
Commenting partly to start "following" this thread so I can see if anyone else knows.
Thanks!
EDIT: one more request. I'm still learning the scripting language, so if I wanted to check "if it's the first turn deal x damage, else deal y damage" would I write: !$game_troop.turn_count(1) : (4 * atk + 4 * agi) - 2 * def ; (2 * atk + 2 * agi) - 2 * def
You would write something like this:
$game_troop.turn_count == 1 ? formula1 : formula2
This will make formula1 to be used if the turn count is 1, otherwise it uses formula2.
So, the left side (from the question mark) is the condition, the right side is the branch itself.
The method between the question mark and double colon happens when the condition is true, and the method to the right-most happens when the condition is false.
Also, $game_troop.turn_count returns an integer number, so you can directly implement it into your formulas as well.
For example:
a.atk * 0.2 * $game_troop.turn_count
This will make your damage highly dependent on the turn count. Could be useful for some skills, I guess.
$game_troop.turn_count == 1 ? formula1 : formula2
This will make formula1 to be used if the turn count is 1, otherwise it uses formula2.
So, the left side (from the question mark) is the condition, the right side is the branch itself.
The method between the question mark and double colon happens when the condition is true, and the method to the right-most happens when the condition is false.
Also, $game_troop.turn_count returns an integer number, so you can directly implement it into your formulas as well.
For example:
a.atk * 0.2 * $game_troop.turn_count
This will make your damage highly dependent on the turn count. Could be useful for some skills, I guess.
Thanks for your assistance!
Original thread: https://forums.rpgmakerweb.com/threads/damage-based-on-number-of-turns-in-battle.60278/