// Use this for initialization void Start() { //Initialize Abilities - TODO Should this be done statically? tumble = new Tumble(); tumble.setScript(this); silverBolts = new Silver_Bolts(); silverBolts.setScript(this); condemn = new Condemn(); condemn.setScript(this); finalHour = new Final_Hour(); finalHour.setScript(this); shadowBolt = new ShadowBolt(); shadowBolt.setScript(this); IconWidth = tumbleTexture.width; IconHeight = tumbleTexture.height; level = 1; //Initially not running running = false; idling = true; a = gameObject.GetComponent(typeof(Animation)) as Animation; originalRotation = transform.localRotation; alive = true; inventory = new Item[inventorySize]; Bow startingBow = new Bow(); startingBow.randomizeWeapon(1, 1); awardItem(startingBow); Helm startingHelm = new Helm(); startingHelm.randomizeArmor(1, 1); awardItem(startingHelm); Chest startingChest = new Chest(); startingChest.randomizeArmor(1, 1); awardItem(startingChest); Gloves startingGloves = new Gloves(); startingGloves.randomizeArmor(1, 1); awardItem(startingGloves); Boots startingBoots = new Boots(); startingBoots.randomizeArmor(1, 1); awardItem(startingBoots); checkpointTexture = Resources.Load("CheckpointTexture/CheckpointMaybe") as Texture2D; playerPortrait = Resources.Load("CheckpointTexture/vayne_circle") as Texture2D; playerManaTexture = Resources.Load("PlayerTextures/mana") as Texture2D; swiftDeathTexture = Resources.Load("VayneTextures/swiftDeath") as Texture2D; shadowBoltTexture = Resources.Load("VayneTextures/ShadowBolt") as Texture2D; leftClickOverlay = Resources.Load("InstructionPage/leftclick") as Texture2D; rightClickOverlay = Resources.Load("InstructionPage/rightclick") as Texture2D; winTexture = Resources.Load("GUITextures/victoryFull") as Texture2D; lossTexture = Resources.Load("GUITextures/defeatFull") as Texture2D; continueButton = Resources.Load("InstructionPage/Continue") as Texture2D; continueButtonHighlighted = Resources.Load("InstructionPage/Continue2") as Texture2D; equipment = new Item[6]; //TODO decide on size equipmentRect = new Rect(50, 50, 300, 300); inventoryRect = new Rect(Screen.width - 350, 50, 300, Mathf.Ceil(inventorySize / 6) * 50 + 20); confirmRect = new Rect((Screen.width / 2) - 150, Screen.height / 4, 300, 300); continueRect = new Rect((Screen.width / 2) - (continueButton.width / 2), Screen.height * (3.0f/4.0f), continueButton.width, continueButton.height); movementSpeed = 1; recalculateStats(); if(PlayerPrefs.GetString("IsSaveGame") == "true"){ name = PlayerPrefs.GetString("SaveFileName"); Load(); } currentHealth = maxHealth; currentMana = maxMana; Save(); }
// Use this for initialization void Start() { currentHealth = maxHealth; //Initialize Abilities - TODO Should this be done statically? tumble = new Tumble(); tumble.setScript(this); silverBolts = new Silver_Bolts(); silverBolts.setScript(this); condemn = new Condemn(); condemn.setScript(this); finalHour = new Final_Hour(); finalHour.setScript(this); // valor = new Valor(); // valor.setScript(this); IconWidth = tumbleTexture.width; IconHeight = tumbleTexture.height; //Initially not running running = false; idling = true; a = gameObject.GetComponent(typeof(Animation)) as Animation; originalRotation = transform.localRotation; //spinning = false; alive = true; }
public static void OnProcessSpellcast(AIBaseClient sender, AIBaseClientProcessSpellCastEventArgs args) { if (args.Target == null) { return; } #region ward brush after condemn if (sender.IsMe && args.SData.Name.ToLower().Contains("condemn") && args.Target.IsValid) { var target = (AIBaseClient)args.Target; if (target != null) { if (Program.MainMenu.GetMenuBool("Combo Settings", "EQ") && target.IsVisible && !target.HasBuffOfType(BuffType.Stun) && Program.Q.IsReady()) //#TODO: fix { var tumblePos = target.GetTumblePos(); Tumble.Cast(tumblePos); } } /*if (NavMesh.IsWallOfType(args.End, 100)) * { * var blueTrinket = ItemId.Farsight_Alteration; * if (Items.HasItem((int)ItemId.Farsight_Alteration, Heroes.Player) && * Items.CanUseItem((int)ItemId.Farsight_Alteration)) * blueTrinket = ItemId.Farsight_Alteration; * * var yellowTrinket = ItemId.Warding_Totem; * if (Items.HasItem((int)ItemId.Greater_Stealth_Totem_Trinket, Heroes.Player)) * yellowTrinket = ItemId.Greater_Stealth_Totem_Trinket; * * if (Items.CanUseItem((int)blueTrinket)) * Items.UseItem((int)blueTrinket, args.End.Randomize(0, 100)); * if (Items.CanUseItem((int)yellowTrinket)) * Items.UseItem((int)yellowTrinket, args.End.Randomize(0, 100)); * }*/ } #endregion ward brush after condemn #region Anti-Stealth if (args.SData.Name.ToLower().Contains("talonshadow")) //#TODO get the actual buff name { if (ObjectManager.Player.HasItem((int)ItemId.Oracle_Alteration) && ObjectManager.Player.CanUseItem((int)ItemId.Oracle_Alteration)) { ObjectManager.Player.UseItem((int)ItemId.Oracle_Alteration, Heroes.Player.Position); } else if (ObjectManager.Player.HasItem((int)ItemId.Control_Ward)) { ObjectManager.Player.UseItem((int)ItemId.Control_Ward, Heroes.Player.Position.Randomize()); } } #endregion Anti-Stealth if (MyWizard.ShouldSaveCondemn()) { return; } if (sender.Distance(Heroes.Player) > 1000 || !args.Target.IsMe || args.SData == null) { return; } //how to milk alistar/thresh/everytoplaner var spellData = SpellDb.GetByName(args.SData.Name); if (spellData != null && !Lists.UselessChamps.Contains(sender.CharacterName)) { if (spellData.CcType == CcType.Knockup || spellData.CcType == CcType.Stun || spellData.CcType == CcType.Knockback || spellData.CcType == CcType.Suppression) { Program.E.Cast(sender); } } }