private void AdvanceTurn() //Does exactly what it says on the tin { if (AttackingTeam) { PostActionInfliction(ref CharacterParty[ActiveCharacter].StatusList, ref CharacterParty[ActiveCharacter].CurrentHealth); CharacterParty[ActiveCharacter].ModeDownCheck(); ModeBarUpdate(); if (ActiveCharacter + 1 == CharacterPartySize) { SwapActiveTeam(); } else { ActiveCharacter++; CharacterParty[ActiveCharacter].ValueUpdate(); CastCooldownDecrease(ref CharacterParty[ActiveCharacter].Commands); StatusHandler.Decrease(ref CharacterParty[ActiveCharacter].StatusList); } OptionSelected = false; CastSelected = false; CastMenuToggle(false); ItemMenuToggle(false); OptionSelectMarker.transform.position += new Vector3(0, 32 * OptionID, 0); //moves the option select marker back to ATTACK OptionID = 0; CastID = 0; FriendlyTarget = ActiveCharacter; } else { PostActionInfliction(ref EnemyParty[ActiveEnemy].StatusList, ref EnemyParty[ActiveEnemy].CurrentHealth); if (ActiveEnemy + 1 == EnemyPartySize) { SwapActiveTeam(); } else { ActiveEnemy++; EnemyParty[ActiveEnemy].ValueUpdate(); CastCooldownDecrease(ref EnemyParty[ActiveEnemy].Commands); StatusHandler.Decrease(ref EnemyParty[ActiveEnemy].StatusList); } } SelectDelayReset(); ModeBarUpdate(); }
private void SwapActiveTeam() { ActiveCharacter = 0; ActiveEnemy = 0; AttackingTeam = !AttackingTeam; if (AttackingTeam) { CharacterParty[ActiveCharacter].ValueUpdate(); CastCooldownDecrease(ref CharacterParty[ActiveCharacter].Commands); StatusHandler.Decrease(ref CharacterParty[ActiveCharacter].StatusList); } else { EnemyParty[ActiveEnemy].ValueUpdate(); CastCooldownDecrease(ref EnemyParty[ActiveEnemy].Commands); StatusHandler.Decrease(ref EnemyParty[ActiveEnemy].StatusList); } }