protected void Revolation() { general++; this.Level = 1; int genSoul = 100 * general + Random.Range(0, 50) + (int)(this.SoulPoint * 0.02f * general); GameManager.gameMain.RecycleSoul(this.SoulPoint - genSoul); this.SoulPoint = genSoul; this.soulBorrow = 0; talentPoint += SoulPoint; MonsterName = this.name.Split('_')[0] + "_" + GetGenrealText(general); this.transform.localScale = initialSCale; this.expPoint.ResetTo(100); this.expPoint.AddValue(-this.expPoint.MaxValue); int rnd = Random.Range(0, Mathf.Min(50, talentPoint)); this.healPoint.ResetTo(this.healPoint.MaxValue - this.healPoint.BuffValue + rnd * 50); talentPoint -= rnd; rnd = Random.Range(0, Mathf.Min(50, talentPoint)); this.manaPoint.ResetTo(this.manaPoint.MaxValue - this.manaPoint.BuffValue + rnd * 50); talentPoint -= rnd; rnd = Random.Range(0, Mathf.Min(50, talentPoint)); this.attack.ResetTo(this.attack.MaxValue - this.attack.BuffValue + rnd); talentPoint -= rnd; rnd = Random.Range(0, Mathf.Min(50, talentPoint)); this.deffence.ResetTo(this.deffence.MaxValue - this.deffence.BuffValue + rnd); talentPoint -= rnd; rnd = Random.Range(0, Mathf.Min(50, talentPoint)); this.speed.ResetTo(this.speed.MaxValue - this.speed.BuffValue + rnd); talentPoint -= rnd; rnd = Random.Range(0, Mathf.Min(50, talentPoint)); this.luck.ResetTo(this.luck.MaxValue - this.luck.BuffValue + (int)Mathf.Ceil(rnd * 0.1f)); talentPoint -= rnd; rnd = Random.Range(0, Mathf.Min(50, talentPoint)); this.mind.ResetTo(this.mind.MaxValue - this.mind.BuffValue + (int)Mathf.Ceil(rnd * 0.1f)); talentPoint -= rnd; evoType e = GetEvoType(); GetEvoBonus(e); if (e != evoType.Normal) { this.MonsterName = e.ToString() + " " + MonsterName; } this.gameObject.name = MonsterName; }
void GetEvoBonus(evoType e) { switch (e) { case evoType.Strong: this.healPoint.AddMaxValue(500); break; case evoType.Wise: this.manaPoint.AddMaxValue(500); break; case evoType.Power: this.attack.AddMaxValue(30); break; case evoType.Protect: this.deffence.AddMaxValue(30); break; case evoType.Speed: this.speed.AddMaxValue(20); break; case evoType.Lucky: this.luck.AddMaxValue(10); break; case evoType.Rare: this.healPoint.AddMaxValue(300); this.manaPoint.AddMaxValue(300); this.attack.AddMaxValue(20); this.deffence.AddMaxValue(20); this.speed.AddMaxValue(10); this.luck.AddMaxValue(5); break; case evoType.Epic: this.healPoint.AddMaxValue(500); this.manaPoint.AddMaxValue(500); this.attack.AddMaxValue(30); this.deffence.AddMaxValue(30); this.speed.AddMaxValue(20); this.luck.AddMaxValue(10); break; case evoType.Boss: this.healPoint.AddMaxValue(1000); this.manaPoint.AddMaxValue(1000); this.attack.AddMaxValue(50); this.deffence.AddMaxValue(50); this.speed.AddMaxValue(30); this.luck.AddMaxValue(20); break; case evoType.Normal: this.healPoint.AddMaxValue(100); this.manaPoint.AddMaxValue(100); this.attack.AddMaxValue(10); this.deffence.AddMaxValue(10); this.speed.AddMaxValue(2); break; default: break; } }