//================================================================================================================================================ //Event Conditions END //================================================================================================================================================ //================================================================================================================================================ //Event START //================================================================================================================================================ void Event0Execution() { eventItems[0].eventExecuted = 1; //Set Event 0 to "Active" //Special Case as still need to add turrets that are level 3 or more even after reaching condition TurretValueSettings t = FindObjectOfType <TurretValueSettings> (); foreach (TurretTemplate whiteTurrets in eventItems[0].affectedWhiteTurrets) { for (int i = 0; i < whiteTurrets.turretValues.upgradeOrInvestCost.Length; i++) { //print (whiteTurrets.gameObject.name); //print (t.whiteCatapult1.upgradeOrInvestCost[i]); whiteTurrets.turretValues.upgradeOrInvestCost[i] = (int)(whiteTurrets.turretValues.upgradeOrInvestCost[i] * 1.5f); //print (t.whiteCatapult1.upgradeOrInvestCost[i]); //print ("--"); } } eventLineUp.Add("Over Investments has caused the previously fully invested Blue Turrets to be more expensive on the next wave"); string chat = "All Fully Invested Blue Turrets are now more Expensive for 1 Wave!"; eventItems[0].chatText = ManaSystem.inst.gui.AddEventChat(chat); //Note: Event End Should Come First Before Execute Event if (eventItems[0].eventExecuted == 1) { EventEnd += Event0End; } }
protected override void SetValues() { if (!isPrebuilt) { turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.catapult1s); } else { switch (level) { case 1: if (faction == Faction.black) { turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.blackCatapult1s); } else if (faction == Faction.white) { turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.whiteCatapult1s); } break; case 2: if (faction == Faction.black) { turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.blackCatapult2s); } else if (faction == Faction.white) { turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.whiteCatapult2s); } break; case 3: if (faction == Faction.black) { turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.blackCatapult3s); } else if (faction == Faction.white) { turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.whiteCatapult3s); } break; default: print("Error in Level"); break; } } }
protected override void UpgradeStats() { if (!isPrebuilt) { switch (level) { case 1: turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.catapult1s); break; case 2: turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.catapult2s); break; case 3: turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.catapult3s); break; default: print("Error in Level"); break; } } else //Incase there is a need for upgrading of turrets as events { switch (level) { case 1: if (faction == Faction.black) { turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.blackCatapult1s); } else if (faction == Faction.white) { turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.whiteCatapult1s); } break; case 2: if (faction == Faction.black) { turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.blackCatapult2s); } else if (faction == Faction.white) { turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.whiteCatapult2s); } break; case 3: if (faction == Faction.black) { turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.blackCatapult3s); } else if (faction == Faction.white) { turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.whiteCatapult3s); } break; default: print("Error in Level"); break; } } }