Turn Order Guide

In this guide, all spells/abilities will be described in detail in the order they occur in game. Please note this is a work in progress and needs testing time to verify.

1. **Draw a Card**
	* Drawing a card is the very first step at the beginning of your turn.
2. **Placing units**
	* Units will be transparent when placed on the board, before PUNCH is pressed. When both players are ready and end their turn, all the units played will be on their respective square immediately.
3. **Turn Start / Charge / Spells / Debut**
	* All units with an ability that is turn start, charge, debut, or a spell that was cast will go next. These all occur at different points in time depending on what type of ability they are.
		+ Note: Abilities of the same class (two return spells or two damage spells) that target specific units *usually* go before rows/column spells
		+ Note: All actions within turn start/charge/spell/debut will trigger during this step (same with turn end). This means, for example, if a spell causes you to go below 0 health, but a debut allows you to heal back to above 0 health, both will occur and you will stay alive.
		+ Note: All death and heritage effects occur immediately. This means that as soon as the unit dies, everything will pause. The heritage/death animation will occur, and the "do X when this unit gains heritage" or "Death: Do X" will occur during this pause, regardless of the type of ability. Heritage will not transfer, however, to units that are dead with the same spell.
	* 1) **Summon units** (See Royal Archer, Polar temple, etc)
	* 2) **Clone**: (See Inversion)
		+ Note: Inversion will grab and put the unit in the same location. If that location is occupied, it will put it closer to the enemy fist in the same row.
	* 3) **Transform** (See Moe!?)
		+ Note: Units with turn start: buffs (See Wild Paean Singer) still trigger even if they get transformed.
		+ Note: Polar Fanatic transforms, but his debut sacrifice still occurs. Bone mound was transformed, sacrificed, and buffed an ally.
	* 4) **Silence** (See Magic-break Professor or Numbing Frost, etc)
		+ Note: "Silence" spell (1 mana, common recluse) triggers after buffs (maybe because it does 1 damage)
		+ Note: Silence occures before Protective Anima!
	* 5) **Buffs** (Example: give ally +1/+1, give ally trample, give ally Shroud)
		+ NOTE: Buff spells have an order too, but I am not going to list them. They are usually in ideal order, meaning if you are giving a unit trample and shroud, it will shroud second. Second example is if you give a unit +0/+1 then cast mountain power (Give target ally +X/+0 based on units health), mountain power will cast second.
		+ Note: Frost drain before Protective Anima BUG
		+ Note: Nun of Cloud double defense after mountain power spell.
		+ Note: Wild Boar Axe triggered before Power of Dragon Rise
	* 6) **Spirit Posession**(See Master of Spirit Possession or Spirit Possession)
		+ Spirit goes before defender abilities, meaning a wall will not attack.
	* 7?) **Defender/Can't Strike**(See Monk of Peace or Yin & Yang Symbol)
		+ This occurs after buffs (PA blocks defender abilities)
		+ Yin & Yang Symbol goes BEFORE (Wall DOES attack)
	* 8) **Damage Enemy Player** (see Temple Marksman or Petrel's Mortar)
		+ Note: Mask of Madness procs after damaging enemy player (bug?)
		+ Note: Force of Warp procs before damaging enemy player
		+ Note: Returning adjacent units nulls the synergy damage, but all buff damage will still occur before the return.
		+ Note: Petrel's Mortar behaves differently than Temple Marksman. The damge is stopped completely by returns and reduced by debuffs.
	* 9) **Switch positions** (see Leaf Mesmer, Holy Blade, Lin, or Dinin No. 9)
		+ Note: Lin is bugged right now, where she will change positions before Bone Explosion but after Polar Fanatic.
		+ Note: Blood Blade of Boreas gave buffs to unit before switch, then switch
	* ?) **Manipulate**
	* 10) **Sacrifice**(see Bone Explosion or Polar Fanatic, etc)
		+ Note: If Temple Marksman gets killed due to a sacrifice, he still does damage
	* 11) **Returns** (see Hurricane or Violent Storm, etc)
	* 11.5) **Change lanes** (see Eisele, Bloody Soul  or Reynard Ronin)
		+ Note: currently there is a bug(?) that when a return spell is cast on the unit, the card will return to your hand and change lanes, so you essentially duplicate the card (stays on the board and a copy in your hand)
		+ Note: The animation for changing lanes may be near the end of the turn start, however, if the only open lane is caused by an enemy unit being destroyed or damaged to death, the change lane unit will not change lanes.
	* 12) **"If the first enemy in target row just entered..."** (see scarecrows, Imperial Cuirassier, Angel of Retribution, etc)
		+ This effect will occure during turn start. This means that if a unit was summoned (see Powley, Petrel or Royal Archer, etc), this will trigger the effect.
		+ Two Scarecrows in the same lane:
			- If there are 2 scarecrows in a lane and the enemy drops 2 units, both scarecrows will go (assuming one of them destroys or removes an enemy, see Puzzled Scarecrow or Deadly Scarecrow)
			- Note: This applies to non-scarecrow units too (see Imperial Cuirassier etc)
			- Note: Two scarecrow's in the same lane, the one closest to enemy fist will trigger (could be by horse knight destroyed instead of scarecrow)
		+ Note: Puzzled Scarecrow returned the only enemy in a row, Timorous Assassin did not attack.
	* 13) **Debuffs** (example: -1/-1)
	* ?) **Move enemy into your hand** (See Lost Faith or Bewitching Shadow)
	* 13/14) **Destroy**
		+ NOTE: destroy is before damage when destroy is a spell and damage is spell (crash damage
		+ NOTE: damage before destroy if damage is spell/debut and destroy is debut
		+ NOTE: Spell destroy before debut destroy
	* 13/14) **Damage**
		+ Row (arrows) then target (chain lighting) then crash (thunderbolt) then random (firetrick) then first (fireball)
	* Generic Turn Start Notes (Need to Sort)
	* Charging repair Kidou-7 occures before 1) Summoning Units (see kidou-7)
	* "Enemy can't attack" (See Temple Missionary or Droid-Disturber) before Light's retribution
	* Firestorm destroy enemy A, lilith turn start destroyed enemy A that was already destroyed by firestorm
	* Player A charged to repair boy-Kidou, Playser B inversion'ed this boy-kidou, then player A kidou turned into robot and pl ayer B did not (B did use charge that turn)
	* Holy smite before bone explosion (BE didn't -4/-4)
	* Bone explosion before reaper +1/+1 due to empty hand
	* Scottish Drunk before Polar Fanatic
	* Enemy Yin & Yang went before Testudo Arhat got shroud from boar stick.
	* Blood blade then Dragon Power.
4. **Pre-strike**
	* All pre-strike abilities go before striking. If a unit has 0 attack or defender, it will not strike, therefore it will not prestrike. The regular attack order determines which abilities go first, and two units attacking at the same time will have both abilities occur, no matter what. For example: if an enemy has an ability "pre-strike give a random enemy -1/-1" and an ally has "pre-strike give ally +1/+1" the buffs will go before the debuffs. Another example is a 1/1 unit has "pre-strike deal 1 damage to all enemy units" and the other unit has "pre-strike deal 1 damage to all enemy units", they will both use their ability, even though one of them will have 0 hp for a moment.
		+ NOTE: need to test Meson prestrike vs give enemy -1 prestrike
			- tested alchemist vs anabel, only units on the field, anabel went first then alchemist, meaning it is probably the same order as turn start (buff before debuffs)
5. **Turn End**
	* Same as turn start WORK IN PROGRESS
	* Need to place "return this unit to hand" (probably before debuffs)

* Needs Testing
* moe before silence?
* inversion a temple marksman, both people die? who wins?
* need to test temple marksman being returned, do no damage
* Test heal spell and killing Scarlet Minion in the same turn (to test all turn start will occure even with death abilities)
* Two spells both with crash damage
* trample with counterattack
* two spells, both players at negative HP, who wins? (source says coin toss, should be lower negative loses)