public override void ActivateSkill() { transform.SetParent(null); //버서커 상태가 이미 활성화되어 있으면 비활성화시키고 오브젝트 제거 Berserk berserkAlready = skillCaster.GetComponentInChildren <Berserk>(); if (berserkAlready != null) { berserkAlready.ReleaseSkill(); Destroy(berserkAlready.gameObject); Destroy(gameObject); skillCaster.GetComponent <PlayerControl>().SetIsDelay(false); return; } transform.SetParent(skillCaster.transform); timer = 0; status = skillCaster.GetComponent <PlayerStatus>(); //현재 체력이 부족하면 활성화되지 않음 if (status.currentHP <= costHP) { Destroy(gameObject); return; } isActSkill = true; status.BonusATK(bonusATK); status.BonusASP(bonusASP); status.BonusKBP(bonusKBP); status.BonusKBR(bonusKBR); status.BonusHSR(bonusHSR); }
public Warrior(string cName, string pClass, int bDamage, int maxHp) : base(cName, pClass, bDamage, maxHp) { characterName = cName; baseDamage = bDamage; currentHealthPoints = maxHp; maxHealthPoints = maxHp; normalAttack = new NormalAttack(); specialAttack = new Berserk(); }
public void Destroy() { if (this._owner.bufListDetail.GetActivatedBufList().Find((Predicate <BattleUnitBuf>)(x => x is BattleUnitBuf_Emotion_Wrath_Berserk)) is BattleUnitBuf_Emotion_Wrath_Berserk Berserk) { Berserk.Destroy(); } if (this._owner.bufListDetail.GetActivatedBufList().Find((Predicate <BattleUnitBuf>)(x => x is Berserk_Enemy)) is Berserk_Enemy BerserkEnemy) { BerserkEnemy.Destroy(); } }
private void BabarianSkill_VisibleChanged(object sender, EventArgs e) { Bash.SetSkillPoints = "0"; Leap.SetSkillPoints = "0"; DoubleSwing.SetSkillPoints = "0"; Stun.SetSkillPoints = "0"; DoubleThrow.SetSkillPoints = "0"; LeapAtk.SetSkillPoints = "0"; ConRate.SetSkillPoints = "0"; Frengy.SetSkillPoints = "0"; WhellWind.SetSkillPoints = "0"; Berserk.SetSkillPoints = "0"; Bash.setTextBoxColor(); Leap.setTextBoxColor(); DoubleSwing.setTextBoxColor(); Stun.setTextBoxColor(); DoubleThrow.setTextBoxColor(); LeapAtk.setTextBoxColor(); ConRate.setTextBoxColor(); Frengy.setTextBoxColor(); WhellWind.setTextBoxColor(); Berserk.setTextBoxColor(); }
public Warrior(int p, int p_2) : base(p, p_2) { vSpecialAttack = new Berserk(); }
private static CurrentSpell BerserkerCommands(Player warrior) { ConsoleKeyInfo enter = new ConsoleKeyInfo(); Console.Clear(); var counter = 1; while (enter.Key != ConsoleKey.Enter) { if (enter.Key == ConsoleKey.DownArrow) { counter++; } else if (enter.Key == ConsoleKey.UpArrow) { counter--; } GameTitle.GetTitle(); string actionSelect = $"SELECT ACTION FOR {warrior.Name}"; string goBerserk = $"BERSERK MODE-- DO DOUBLE DAMAGE FOR NEXT 3 ROUNDS, COST: 200HP, COOLDOWN: 5"; string axeChop = $"AXE CHOP-- DAMAGE:{warrior.Damage * 2}, NO COOLDOWN"; string wildAxes = $"WILD AXES-- DAMAGE:{warrior.Damage * 4}, COOLDOWN: 3"; string execute = $"EXECUTE-- KILL ENEMY IF HIS HP IS BELOW 700"; Console.WriteLine("{0}", actionSelect); switch (counter) { case 1: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", "-> " + goBerserk); Console.WriteLine("{0,2}", axeChop); Console.WriteLine("{0,2}", wildAxes); Console.WriteLine("{0,2}", execute); break; case 2: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", goBerserk); Console.WriteLine("{0,2}", "-> " + axeChop); Console.WriteLine("{0,2}", wildAxes); Console.WriteLine("{0,2}", execute); break; case 3: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", goBerserk); Console.WriteLine("{0,2}", axeChop); Console.WriteLine("{0,2}", "-> " + wildAxes); Console.WriteLine("{0,2}", execute); break; case 4: Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", goBerserk); Console.WriteLine("{0,2}", axeChop); Console.WriteLine("{0,2}", wildAxes); Console.WriteLine("{0,2}", "-> " + execute); break; default: if (counter == 5) { counter = 1; Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", "-> " + goBerserk); Console.WriteLine("{0,2}", axeChop); Console.WriteLine("{0,2}", wildAxes); Console.WriteLine("{0,2}", execute); break; } else if (counter == 0) { counter = 4; Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0,2}", goBerserk); Console.WriteLine("{0,2}", axeChop); Console.WriteLine("{0,2}", wildAxes); Console.WriteLine("{0,2}", "-> " + execute); break; } break; } enter = Console.ReadKey(); Console.Clear(); } var currentSpell = new CurrentSpell(); switch (counter) { case 1: var berserk = new Berserk(); currentSpell = berserk.GoBerserk(warrior); break; case 2: var axeHit = new AxeChop(); currentSpell = axeHit.GetHit(warrior); break; case 3: var wildAxe = new WildAxes(); currentSpell = wildAxe.GetWildAxes(warrior); break; default: var execution = new Execute(); currentSpell = execution.GetExecution(warrior); break; } return(currentSpell); }