Damage based on number of turns in battle

mcscottyG

Villager
Member
Joined
Mar 22, 2016
Messages
9
Reaction score
0
First Language
english
Primarily Uses
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.
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,791
Reaction score
943
First Language
Chinese
Primarily Uses
N/A
$game_troop.turn_count might be useful in the damage formula in your case :)
 

Cadh20000

Veteran
Veteran
Joined
Sep 15, 2013
Messages
1,828
Reaction score
445
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

mcscottyG

Villager
Member
Joined
Mar 22, 2016
Messages
9
Reaction score
0
First Language
english
Primarily Uses
$game_troop.turn_count might be useful in the damage formula in your case :)
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
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
823
First Language
Hungarian
Primarily Uses
RMVXA
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.
 

mcscottyG

Villager
Member
Joined
Mar 22, 2016
Messages
9
Reaction score
0
First Language
english
Primarily Uses
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.
Thanks for your assistance!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,547
Members
137,835
Latest member
yetisteven
Top