public virtual string Attack(Character enemy) { if (!ChanceToAttack(enemy)) { return(GameLogUtils.MissedAttack(this)); } var damage = CriticalChance() ? random.Next(Strength) : random.Next(Strength) * 2; damage = enemy.Defense(damage); return(GameLogUtils.Attack(damage, this, enemy)); }
public string CalculateLvl() { var needExperience = Math.Pow(2, Level + 4); if (CurrentExperience > needExperience) { Level++; } Debug.Log($"{CurrentExperience}/{needExperience} => Level {Level}"); return(GameLogUtils.Experience(this, needExperience)); }
private string AttackTechTalk(Character enemyCharacter) { if (!CheckStamina(TechTalkCost)) { return(GameLogUtils.LowStamina()); } int YourPoints = random.Next(Inteligence); int EnemyPoints = random.Next(enemyCharacter.Endurance); if (YourPoints < EnemyPoints) { return(GameLogUtils.TechTalk(this, false)); } enemyCharacter.Status = Status.Sleep; return(GameLogUtils.TechTalk(this, true)); }
private string InviteToTraining(Character enemyCharacter) { if (!CheckStamina(InviteToTrainingCost)) { return(GameLogUtils.LowStamina()); } int YourPoints = random.Next(Charisma); int EnemyPoints = random.Next(enemyCharacter.Inteligence); Debug.Log(string.Format("Your Generated Charisma Chance: {0}, Enemy Generated Inteligence Point: {1}", YourPoints, EnemyPoints)); if (YourPoints < EnemyPoints) { return(GameLogUtils.CouchTraining(this, false)); } enemyCharacter.isEnemy = false; return(GameLogUtils.CouchTraining(this, true)); }