protected override IMilitaryVehicle Create(string name) { Warship warship; var result = name.Replace(" ", "").ToLower(); if (result == "bougainville") { warship = new Bougainville(); } else if (result == "grafzeppelin") { warship = new GrafZeppelin(); } else if (result == "oleg") { warship = new Oleg(); } else if (result == "tachibana") { warship = new Tachibana(); } else if (result == "valkyrie") { warship = new Valkyrie(); } else { return(null); } warship.Swim(); return(warship); }
public Warship CreateWarship(string name) { Warship warship; var result = name.Replace(" ", "").ToLower(); if (result == "bougainville") { warship = new Bougainville(); } else if (result == "grafzeppelin") { warship = new GrafZeppelin(); } else if (result == "oleg") { warship = new Oleg(); } else if (result == "tachibana") { warship = new Tachibana(); } else if (result == "valkyrie") { warship = new Valkyrie(); } else { return(null); } return(warship); }
private void InitialiseVariables() { paladin = GameObject.FindWithTag("Paladin"); valkyrie = GameObject.FindWithTag("Valkyrie"); sage = GameObject.FindWithTag("Sage"); enemy = GameObject.FindWithTag("Enemy"); paladinController = paladin.GetComponent <Paladin>(); sageController = sage.GetComponent <Sage>(); valkyrieController = valkyrie.GetComponent <Valkyrie>(); enemyController = enemy.GetComponent <Enemy>(); paladinPortraitRenderer = paladinPortrait.GetComponent <SpriteRenderer>(); valkyriePortraitRenderer = valkyriePortrait.GetComponent <SpriteRenderer>(); sagePortraitRenderer = sagePortrait.GetComponent <SpriteRenderer>(); potionButtonImage = potionButton.GetComponent <Image>(); manaButtonImage = manaButton.GetComponent <Image>(); magic1ButtonImage = magic1Button.GetComponent <Image>(); magic2ButtonImage = magic2Button.GetComponent <Image>(); magic3ButtonImage = magic3Button.GetComponent <Image>(); special1ButtonImage = special1Button.GetComponent <Image>(); paladinSelectImage = paladinSelectButton.GetComponent <Image>(); valkyrieSelectImage = valkyrieSelectButton.GetComponent <Image>(); sageSelectImage = sageSelectButton.GetComponent <Image>(); potionButtonText = potionButton.GetComponentInChildren <Text>(); manaButtonText = manaButton.GetComponentInChildren <Text>(); magic1ButtonText = magic1Button.GetComponentInChildren <Text>(); magic2ButtonText = magic2Button.GetComponentInChildren <Text>(); magic3ButtonText = magic3Button.GetComponentInChildren <Text>(); special1ButtonText = special1Button.GetComponentInChildren <Text>(); paladinSelectText = paladinSelectButton.GetComponentInChildren <Text>(); valkyrieSelectText = valkyrieSelectButton.GetComponentInChildren <Text>(); sageSelectText = sageSelectButton.GetComponentInChildren <Text>(); }
// Use this for initialization void Start() { animationController = GetComponent <Animator>(); paladinController = paladin.GetComponent <Paladin>(); valkyrieController = valkyrie.GetComponent <Valkyrie>(); sageController = sage.GetComponent <Sage>(); turnController = gameManager.GetComponent <TurnController>(); attackDownTransform = transform.Find("Attack Down"); attackDownImage = attackDownTransform.GetComponentInChildren <SpriteRenderer>(); TR_enraged = transform.Find("Enraged"); enragedImage = TR_enraged.GetComponentInChildren <SpriteRenderer>(); quarterHealth = healthPoints / 4; specialPower = attackPower * 6; poisonPurple = new Color(139, 0, 139); ailmentCount = 0; poisoned = false; damageText.enabled = false; }
private void Valkyrie2_Click(object sender, RoutedEventArgs e) { //MessageBox.Show("Valkyrie"); this.Hide(); Valkyrie valkyrie = new Valkyrie(); valkyrie.ShowDialog(); this.Show(); }
public ValkyrieFinal(Entity user, GameObject eff) : base(user) { name = "Final"; damage = ValkyrieAttacks.dmg + 6; knockBack = 5f; animationName = "Ultimate_Start"; type = "Side"; stops = true; effect = eff; cUser = (Character)user; valk = (Valkyrie)cUser.speciality; }
public static void Prefix(ref Vector3 __state, ref Valkyrie __instance) { long profileID = Game.instance.GetPlayerProfile().GetPlayerID(); HardcoreData hardcoreProfile = Hardcore.GetHardcoreDataForProfileID(profileID); if (hardcoreProfile != null) { if (hardcoreProfile.skipIntro) { Vector3 position = Player.m_localPlayer.transform.position; __state = new Vector3(position.x, position.y, position.z); } else if (hardcoreProfile.hasDied) { __instance.m_startPause = 0f; } } }
public static void HandleAbnormalityBegin(S_ABNORMALITY_BEGIN p) { AbnormalityManager.BeginAbnormality(p.AbnormalityId, p.TargetId, p.Duration, p.Stacks); if (!SettingsManager.ClassWindowSettings.Enabled) { return; } switch (SessionManager.CurrentPlayer.Class) { case Class.Mystic: Mystic.CheckHurricane(p); Mystic.CheckBuff(p); break; case Class.Warrior: Warrior.CheckBuff(p); break; case Class.Valkyrie: Valkyrie.CheckRagnarok(p); break; case Class.Archer: Archer.CheckFocus(p); Archer.CheckFocusX(p); Archer.CheckSniperEye(p); break; case Class.Lancer: Lancer.CheckArush(p); Lancer.CheckGshout(p); Lancer.CheckLineHeld(p); break; case Class.Priest: Priest.CheckBuff(p); break; case Class.Brawler: Brawler.CheckBrawlerAbnormal(p); break; case Class.Ninja: Ninja.CheckFocus(p); break; case Class.Sorcerer: Sorcerer.CheckBuff(p); break; case Class.Reaper: Reaper.CheckBuff(p); break; case Class.Slayer: Slayer.CheckBuff(p); break; case Class.Berserker: Berserker.CheckBuff(p); break; } }
// Use this for initialization void Start() { spriteImage = GetComponent <SpriteRenderer>(); animationController = GetComponent <Animator>(); TR_petrified = transform.Find("S_Petrified"); petrifiedImage = TR_petrified.GetComponentInChildren <SpriteRenderer>(); TR_special = transform.Find("S_Special"); specialImage = TR_special.GetComponentInChildren <SpriteRenderer>(); TR_magic = transform.Find("S_Magic"); magicImage = TR_magic.GetComponentInChildren <SpriteRenderer>(); GO_guardUp = GameObject.FindWithTag("S_GuardUp"); guardUpImage = GO_guardUp.GetComponent <SpriteRenderer>(); TR_win = transform.Find("S_Win"); winImage = TR_win.GetComponentInChildren <SpriteRenderer>(); TR_wounded = transform.Find("S_Wounded"); woundedImage = TR_wounded.GetComponentInChildren <SpriteRenderer>(); TR_dead = transform.Find("S_Dead"); deadImage = TR_dead.GetComponentInChildren <SpriteRenderer>(); enemy = GameObject.FindWithTag("Enemy"); enemyController = enemy.GetComponent <Enemy>(); turnController = gameManager.GetComponent <TurnController>(); paladinController = paladin.GetComponent <Paladin>(); valkyrieController = valkyrie.GetComponent <Valkyrie>(); AudioSource[] audios = GetComponents <AudioSource>(); takeDamageSound = audios[0]; attackSound = audios[1]; magicSound = audios[2]; b_isDead = false; b_isWounded = false; blueButtonImage = blueButton.GetComponent <Image>(); greenButtonImage = greenButton.GetComponent <Image>(); orangeButtonImage = orangeButton.GetComponent <Image>(); redButtonImage = redButton.GetComponent <Image>(); //Initialise Stats //Derived Stats attackPower = STRENGTH * 10; // 200 avg damage magicPower = SPIRIT * 10; // 1000 avg earth spell damage dodge = AGILITY * 2; // 16% Chance of dodging defencePower = DEFENCE * 2; //6% special = 0; health = MAX_HEALTH; magic = MAX_MAGIC; tileIds = new List <int>(); selectedOrder = new List <int>(); tileIds.Add(1); tileIds.Add(2); tileIds.Add(3); tileIds.Add(4); UpdateStats(); }
private static void RefreshBoard(Board board) { // Clear board board.Clear(); string[] inputs; board.MyGold = int.Parse(Console.ReadLine()); board.EnnemyGold = int.Parse(Console.ReadLine()); board.RoundType = int.Parse(Console.ReadLine()); // a positive value will show the number of heroes that await a command // Units int entityCount = int.Parse(Console.ReadLine()); for (int i = 0; i < entityCount; i++) { inputs = Console.ReadLine().Split(' '); int unitId = int.Parse(inputs[0]); int team = int.Parse(inputs[1]); string unitType = inputs[2]; // UNIT, HERO, TOWER, can also be GROOT from wood1 int x = int.Parse(inputs[3]); int y = int.Parse(inputs[4]); int attackRange = int.Parse(inputs[5]); int health = int.Parse(inputs[6]); int maxHealth = int.Parse(inputs[7]); int shield = int.Parse(inputs[8]); // useful in bronze int attackDamage = int.Parse(inputs[9]); int movementSpeed = int.Parse(inputs[10]); int stunDuration = int.Parse(inputs[11]); // useful in bronze int goldValue = int.Parse(inputs[12]); int countDown1 = int.Parse(inputs[13]); // all countDown and mana variables are useful starting in bronze int countDown2 = int.Parse(inputs[14]); int countDown3 = int.Parse(inputs[15]); int mana = int.Parse(inputs[16]); int maxMana = int.Parse(inputs[17]); int manaRegeneration = int.Parse(inputs[18]); string heroType = inputs[19]; // DEADPOOL, VALKYRIE, DOCTOR_STRANGE, HULK, IRONMAN int isVisible = int.Parse(inputs[20]); // 0 if it isn't int itemsOwned = int.Parse(inputs[21]); // useful from wood1 Unit u; switch (unitType) { case "UNIT": u = new Minion(); break; case "HERO": switch (heroType) { case "DEADPOOL": u = new Deadpool(); break; case "VALKYRIE": u = new Valkyrie(); break; case "DOCTOR_STRANGE": u = new DoctorStrange(); break; case "HULK": u = new Hulk(); break; case "IRONMAN": default: u = new Ironman(); break; } //u.CountDown123 u.Mana = mana; u.MaxMana = maxMana; //u.ManaRegen //u.IsVisible //u.Items break; case "TOWER": u = new Tower(); break; case "GROOT": default: u = new NeutralMonster(); break; } u.Id = unitId; u.TeamId = team; u.X = x; u.Y = y; u.AttackRange = attackRange; u.Health = health; u.MaxHealth = maxHealth; //u.Shield = u.BaseAttackDamage = attackDamage; u.BaseMovementSpeed = movementSpeed; //u.StunDuration //u.Gold board.Units.Add(u); } }