protected override void finishCast(int damage, Mapping.Level mapLevel, HeroClasses.Hero hero) { for (int i = 0; i < castSquares.Length; i++) { GameCharacter test = (GameCharacter)mapLevel.CharacterEntities.FindEntity(castSquares[i]); if (test != null) { test.TakeDamage(damage, hero); } castSquares[i] = new IntVec(0, 0); } }
public override void finishCastandDealDamage(int heroLevel, int heroDamage, Mapping.Level mapLevel, HeroClasses.Hero hero) { for (int i = 0; i < castSquares.Length; i++) { if (mapLevel.Move(hero, castSquares[0], true)) { Audio.playSound("whoosh", 1.0f); cooldown = abilityCooldown; wasJustCast = true; } castSquares[i] = new IntVec(0, 0); } }
protected override void finishCast(int damage, Mapping.Level mapLevel, HeroClasses.Hero hero) { for (int i = 0; i < castSquares.Length; i++) { GameCharacter test = (GameCharacter)mapLevel.CharacterEntities.FindEntity(castSquares[i]); if (test != null) { Engine.Engine.AddVisualAttack(test, "Hero/Execute", .5f, 1.5f, .05f); test.TakeDamage(damage, hero); cooldown = getCooldown(test); } castSquares[i] = new IntVec(0, 0); } }
protected override void finishCast(int damage, Mapping.Level mapLevel, HeroClasses.Hero hero) { for (int i = 0; i < castSquares.Length; i++) { GameCharacter test = (GameCharacter)mapLevel.CharacterEntities.FindEntity(castSquares[i]); if (test != null) { Audio.playSound("DaggerStab"); Engine.Engine.AddVisualAttack(test, "Hero/DaggerSlash", .5f, 1.5f, .05f); test.TakeDamage(damage, hero); } castSquares[i] = new IntVec(0, 0); } }
protected override void finishCast(int damage, Mapping.Level mapLevel, HeroClasses.Hero hero) { for (int i = 0; i < castSquares.Length; i++) { GameCharacter test = (GameCharacter)mapLevel.CharacterEntities.FindEntity(castSquares[i]); if (test != null) { Engine.Engine.AddVisualAttack(hero, test, "Hero/FireballSpell", .25f, 1.0f, .03f); Audio.playSound("Fireball", .25f); test.TakeDamage(damage, hero); } castSquares[i] = new IntVec(0, 0); } }
protected override void finishCast(int damage, Mapping.Level mapLevel, HeroClasses.Hero hero) { for (int i = 0; i < castSquares.Length; i++) { GameCharacter test = (GameCharacter)mapLevel.CharacterEntities.FindEntity(castSquares[i]); if (test != null) { Audio.playSound("Arcane"); Engine.Engine.AddVisualAttack(hero, test, "Hero/Overload", 1.0f, 1.0f, 0); test.DealElementalDamage(Enums.ElementAttributes.Arcane, 7, HeroClasses.Hero.level / 2); test.TakeDamage(damage, hero); } castSquares[i] = new IntVec(0, 0); } }
protected override void finishCast(int damage, Mapping.Level mapLevel, HeroClasses.Hero hero) { for (int i = 0; i < castSquares.Length; i++) { GameCharacter test = (GameCharacter)mapLevel.CharacterEntities.FindEntity(castSquares[i]); if (test != null) { Engine.Engine.AddVisualAttack(test, "Hero/DoubleSlash", .25f, 2.0f, .15f); Audio.playSound("Slash", .25f); test.TakeDamage(damage, hero); if (mapLevel.CharacterEntities.FindPosition(test) != null) { test.TakeDamage(damage, hero); } } castSquares[i] = new IntVec(0, 0); } }
public override void finishCastandDealDamage(int heroLevel, int heroDamage, Mapping.Level mapLevel, HeroClasses.Hero hero) { if (!isActive) { Engine.Engine.Log(hero.damageBoost.ToString()); hero.damageBoost += increase + heroLevel * 2; Engine.Engine.Log(hero.damageBoost.ToString()); createdLevel = heroLevel; isActive = true; wasJustCast = true; } else if (isActive) { hero.damageBoost -= increase + heroLevel; wasJustCast = true; isActive = false; } cooldown = 0; }
protected override void finishCast(int damage, Mapping.Level mapLevel, HeroClasses.Hero hero) { for (int i = 0; i < castSquares.Length; i++) { GameCharacter test = (GameCharacter)mapLevel.CharacterEntities.FindEntity(castSquares[i]); if (test != null) { Audio.playSound("Mugging"); test.TakeDamage(damage, hero); Items.Item heroItem = null; while (heroItem == null || heroItem.ItemType == Enums.ITypes.Consumable) { heroItem = Items.Item.randomItem(mapLevel.DungeonLevel, HeroClasses.Hero.level - 3); } hero.GetInventory().addItem(heroItem); } castSquares[i] = new IntVec(0, 0); } }
public override void finishCastandDealDamage(int heroLevel, int heroDamage, Mapping.Level mapLevel, HeroClasses.Hero hero) { if (!isActive) { createdLevel = heroLevel; Engine.Engine.Log(hero.getArmorBoost().ToString()); hero.ApplyArmorBoost(armorBoost + (int)(heroLevel * 2), int.MaxValue); hero.damageBoost -= (heroLevel); Engine.Engine.Log(hero.getArmorBoost().ToString()); Engine.Engine.AddVisualAttack(hero, "Hero/IceAttack", .25f, 1.5f, .1f); isActive = true; wasJustCast = true; } else if (isActive) { hero.ApplyArmorBoost(0, 0); hero.damageBoost += (heroLevel); isActive = false; wasJustCast = true; } cooldown = 0; }
public override void finishCastandDealDamage(int heroLevel, int heroDamage, Mapping.Level mapLevel, HeroClasses.Hero hero) { if (!isActive) { if (HeroClasses.Hero.Element != null && !HeroClasses.Hero.Element.Contains(Enums.ElementAttributes.Fire)) { HeroClasses.Hero.Element.Add(Enums.ElementAttributes.Arcane); added = true; } isActive = true; wasJustCast = true; } else if (isActive) { if (added) { HeroClasses.Hero.Element.Remove(Enums.ElementAttributes.Arcane); added = false; } wasJustCast = true; isActive = false; } cooldown = 0; }
private void checkGround(Mapping.Level mapLevel) { Item temp = mapLevel.DroppedItems.FindEntity(mapLevel.CharacterEntities.FindPosition(this)); pickupItem(temp, mapLevel); }
public override bool TakeTurn(Mapping.Level mapLevel) { turnOver = false; bool casting = false; int test = health; resetSprite(); if (!visible) { Enemies.Enemy.DeAggroAll(); } updateDOTabilities(mapLevel); if (!isFrozen) { if (MouseController.LeftClicked()) { IInteractable interactableObj = mapLevel.InteractableEnvironment.FindEntity(MouseController.MouseGridPosition()); if (interactableObj != null && Engine.Engine.IsMouseAdjacentToHero()) { Engine.Engine.Log(interactableObj.ToString()); interactableObj.actOn(this); } } if (!casting && !viewingCast) { if (Mapping.KeyboardController.IsTyped(Keys.A)) { turnOver = mapLevel.Move(this, move(Direction.LEFT)); } else if (Mapping.KeyboardController.IsTyped(Keys.W)) { turnOver = mapLevel.Move(this, move(Direction.UP)); } else if (Mapping.KeyboardController.IsTyped(Keys.D)) { turnOver = mapLevel.Move(this, move(Direction.RIGHT)); } else if (Mapping.KeyboardController.IsTyped(Keys.S)) { turnOver = mapLevel.Move(this, move(Direction.DOWN)); } else if (MouseController.LeftClicked()) { attack(mapLevel); } // THESE ARE JUST FOR TESTING else if (Mapping.KeyboardController.IsTyped(Keys.M)) { level += 1; } else if (Mapping.KeyboardController.IsTyped(Keys.LeftShift)) { checkGround(mapLevel); } else if (Mapping.KeyboardController.IsTyped(Keys.RightShift)) { drinkFromJarBar(); } else if (Mapping.KeyboardController.IsPressed(Keys.D1)) { if (abilities[0] != null && abilities[0].cooldown == 0) { viewingCast = true; viewedAbility = 0; abilityKey = Keys.D1; } } else if (Mapping.KeyboardController.IsPressed(Keys.D2)) { if (abilities[1] != null && abilities[1].cooldown == 0) { viewingCast = true; viewedAbility = 1; abilityKey = Keys.D2; } } else if (Mapping.KeyboardController.IsPressed(Keys.D3)) { if (abilities[2] != null && abilities[2].cooldown == 0) { viewingCast = true; viewedAbility = 2; abilityKey = Keys.D3; } } else if (Mapping.KeyboardController.IsPressed(Keys.D4)) { if (abilities[3] != null && abilities[3].cooldown == 0) { viewingCast = true; viewedAbility = 3; abilityKey = Keys.D4; } } else if (Mapping.KeyboardController.IsPressed(Keys.D5)) { if (abilities[4] != null && abilities[4].cooldown == 0) { viewingCast = true; viewedAbility = 4; abilityKey = Keys.D5; } } else if (Mapping.KeyboardController.IsPressed(Keys.D6)) { if (abilities[5] != null && abilities[5].cooldown == 0) { viewingCast = true; viewedAbility = 5; abilityKey = Keys.D6; } } else { turnOver = (Mapping.KeyboardController.IsTyped(Keys.Space)); } } if (viewingCast) { turnOver = castAbility(viewedAbility, mapLevel); if (Mapping.KeyboardController.IsReleased(abilityKey)) { if (abilities[viewedAbility].type != AbilityTypes.Toggle) { Engine.Engine.ClearGridSelections(); abilities[viewedAbility].resetSquares(); } else if (abilities[viewedAbility].cooldown == 0) { abilities[viewedAbility].wasJustCast = false; } viewingCast = !viewingCast; } } if (turnOver) { cooldownAbilities(mapLevel); invisibilityTurnCount -= (!visible) ? 1 : 0; visible = invisibilityTurnCount <= 0; } } else { turnOver = true; } resetArmor(); resetLevel(); CheckElementDamage(); return(turnOver); }
public override void finishCastandDealDamage(int heroLevel, int heroDamage, Mapping.Level mapLevel, HeroClasses.Hero hero) { //SCREW YOU DEVIN hero.setRangeBoost(1); isActive = true; }
public override void finishCastandDealDamage(int heroLevel, int heroDamage, Mapping.Level mapLevel, HeroClasses.Hero hero) { hero.setParryCount(1); cooldown = 8; }
public override void finishCastandDealDamage(int heroLevel, int heroDamage, Mapping.Level mapLevel, HeroClasses.Hero hero) { Engine.Engine.AddVisualAttack(hero, "Hero/DivineShield", .5f, 1.5f, .05f); hero.setParryCount(heroLevel / 5); cooldown = heroLevel / 3; }
public override void finishCastandDealDamage(int heroLevel, int heroDamage, Mapping.Level mapLevel, HeroClasses.Hero hero) { hero.setReflectedDamage(hero.GetArmorRating() / 5); createdLevel = hero.GetArmorRating(); }
public override void finishCastandDealDamage(int heroLevel, int heroDamage, Mapping.Level mapLevel, HeroClasses.Hero hero) { Audio.playSound("Smoke", 1.0f); hero.setInvisibility(10 + heroLevel / 5); cooldown = 20 + heroLevel / 5; }
public override void finishCastandDealDamage(int heroLevel, int heroDamage, Mapping.Level mapLevel, HeroClasses.Hero hero) { heroEffect(hero); cooldown = 6; }
public override IntVec[] viewCastRange(Mapping.Level level, IntVec start) { throw new NotImplementedException(); }