void Start() { target = gameObject.GetComponent <CharacterScript>(); targetEffectBar = target.transform.Find("EffectBar").gameObject; icon = Instantiate(Resources.Load <GameObject>("Prefabs/EffectIcon") as GameObject, new Vector2(targetEffectBar.transform.position.x - 15, targetEffectBar.transform.position.y), Quaternion.identity, targetEffectBar.transform).GetComponent <EffectIcon>(); icon.target = this; icon.effect = "Incoming Damage -" + (intensity * 100.0f).ToString() + "%"; icon.sprite = "DecreaseDamage"; effect(); }
void Start() { target = gameObject.GetComponent <CharacterScript>(); targetEffectBar = target.transform.GetChild(2).gameObject; icon = Instantiate(Resources.Load <GameObject>("Icons/EffectIcon") as GameObject, new Vector2(targetEffectBar.transform.position.x - 15, targetEffectBar.transform.position.y), Quaternion.identity, targetEffectBar.transform).GetComponent <EffectIcon>(); icon.target = this; icon.effect = "Incoming Damage +" + (intensity * 100.0f).ToString() + "%"; icon.sprite = "IncreaseDamage"; maxDuration = duration; health = target.HP; effect(); }
void Start() { if (duration == 0) { duration = 3.0f; } target = gameObject.GetComponent <CharacterScript>(); targetEffectBar = target.transform.Find("EffectBar").gameObject; icon = Instantiate(Resources.Load <GameObject>("Prefabs/EffectIcon") as GameObject, new Vector2(targetEffectBar.transform.position.x - 15, targetEffectBar.transform.position.y), Quaternion.identity, targetEffectBar.transform).GetComponent <EffectIcon>(); icon.target = this; icon.effect = "Stunned"; icon.sprite = "StunDebuff"; maxDuration = duration; effect(); }
void Start() { if (intensity == 0) { intensity = 0.1f; } if (duration == 0) { duration = 10.0f; } target = gameObject.GetComponent <CharacterScript>(); targetEffectBar = target.transform.Find("EffectBar").gameObject; icon = Instantiate(Resources.Load <GameObject>("Prefabs/EffectIcon") as GameObject, new Vector2(targetEffectBar.transform.position.x - 15, targetEffectBar.transform.position.y), Quaternion.identity, targetEffectBar.transform).GetComponent <EffectIcon>(); icon.target = this; icon.effect = "Dex +" + (intensity * 100.0f).ToString() + "%"; icon.sprite = "DexBuff"; maxDuration = duration; effect(); }
void Start() { if (intensity == 0) { intensity = 5; } if (duration == 0) { duration = 5.0f; } target = gameObject.GetComponent <CharacterScript>(); targetEffectBar = target.transform.GetChild(2).gameObject; icon = Instantiate(Resources.Load <GameObject>("Icons/EffectIcon") as GameObject, new Vector2(targetEffectBar.transform.position.x - 15, targetEffectBar.transform.position.y), Quaternion.identity, targetEffectBar.transform).GetComponent <EffectIcon>(); icon.target = this; icon.effect = "Dex -" + intensity.ToString(); icon.sprite = "DexDebuff"; maxDuration = duration; effect(); }
public EffectDescriptionLine(EffectIcon icon, string text) { Icon = icon; Text = text; }
public override string ToString() {///temporary limit time to be max int to prevent parsing errors on not updated tera.core, then limit to max uint after update. return(AbnormalId + "\t" + _type + "\t" + AbType + "\t" + IsBuff + "\t" + Method + "\t" + (Time > int.MaxValue ? int.MaxValue : Time) + "\t" + Tick + "\t" + Amount.ToString("R", CultureInfo.InvariantCulture) + "\t" + Name + "\t" + Itemid + "\t" + ItemName + "\t" + Tooltip + "\t" + IconName.ToLowerInvariant() + "\t" + EffectIcon.ToLowerInvariant() + "\t" + IsShow); }
public static Effect Icon(EffectIcon icon) { return(NWScript.EffectIcon((int)icon) !); }
public static void Draw(this EffectIcon icon, SpriteBatch spriteBatch, Vector2 location) { if (icon == EffectIcon.None) { return; } Texture2D texture = Game1.mouseCursors; Rectangle?rect = null; switch (icon) { case EffectIcon.Health: rect = new Rectangle(0, 438, 10, 10); break; case EffectIcon.Energy: rect = new Rectangle(0, 428, 10, 10); break; case EffectIcon.MaxEnergy: rect = new Rectangle(80, 428, 10, 10); break; case EffectIcon.Defense: rect = new Rectangle(110, 428, 10, 10); break; case EffectIcon.SaveFromDeath: rect = new Rectangle(140, 428, 10, 10); break; case EffectIcon.Attack: rect = new Rectangle(120, 428, 10, 10); break; case EffectIcon.Speed: rect = new Rectangle(130, 428, 10, 10); break; case EffectIcon.Immunity: rect = new Rectangle(150, 428, 10, 10); break; case EffectIcon.CriticalHitRate: rect = new Rectangle(160, 428, 10, 10); break; case EffectIcon.SkillFarming: rect = new Rectangle(10, 428, 10, 10); break; case EffectIcon.SkillFishing: rect = new Rectangle(20, 428, 10, 10); break; case EffectIcon.SkillMining: rect = new Rectangle(30, 428, 10, 10); break; case EffectIcon.SkillCombat: rect = new Rectangle(40, 428, 10, 10); break; case EffectIcon.SkillLuck: rect = new Rectangle(50, 428, 10, 10); break; case EffectIcon.SkillForaging: rect = new Rectangle(60, 428, 10, 10); break; case EffectIcon.Money: rect = new Rectangle(193, 373, 9, 9); break; case EffectIcon.Popularity: // draw smiley (which is actualy 13x13, so we use a smaller scaling factor) Utility.drawWithShadow(spriteBatch, Game1.mouseCursors, new Vector2(location.X, location.Y + 2), new Rectangle(157, 515, 13, 13), Color.White, 0f, Vector2.Zero, 2f, flipped: false, 0.95f); break; // icons from custom texture case EffectIcon.MaxHealth: texture = EffectHelper.Textures.LooseSprites; rect = new Rectangle(0, 0, 10, 10); break; case EffectIcon.Yoba: texture = EffectHelper.Textures.LooseSprites; rect = new Rectangle(10, 0, 10, 10); break; case EffectIcon.TreasureChest: rect = new Rectangle(137, 412, 10, 11); break; case EffectIcon.Animal_Chicken: Utility.drawWithShadow(spriteBatch, Game1.mouseCursors, new Vector2(location.X, location.Y + 5), new Rectangle(0, 448, 32, 16), Color.White, 0f, Vector2.Zero, 1.2f, flipped: false, 0.95f); break; case EffectIcon.Animal_Cow: Utility.drawWithShadow(spriteBatch, Game1.mouseCursors, new Vector2(location.X, location.Y + 2), new Rectangle(40, 449, 17, 14), Color.White, 0f, Vector2.Zero, 1.8f, flipped: false, 0.95f); break; case EffectIcon.Glow: texture = EffectHelper.Textures.Emojis; rect = new Rectangle(9, 63, 9, 9); break; case EffectIcon.Person_Lewis: Utility.drawWithShadow(spriteBatch, EffectHelper.Textures.LooseSprites, new Vector2(location.X, location.Y), new Rectangle(20, 0, 12, 13), Color.White, 0f, Vector2.Zero, 2f, flipped: false, 0.95f); break; } if (rect.HasValue) { Utility.drawWithShadow(spriteBatch, texture, location, rect.Value, Color.White, 0f, Vector2.Zero, 3f, flipped: false, 0.95f); } }