public override void UpdateAccessory(Player player, bool hideVisual) { ACCPlayer accPlayer = Main.player[player.whoAmI].GetModPlayer <ACCPlayer>(); if (ExpSentriesMod != null) { player.GetModPlayer <ApacchiisClassesMod.MyPlayer>().hasEquippedClass = true; accPlayer.hasDefender = true; //Reflection for cross-mod compatability without hard references ModPlayer esPlayer = player.GetModPlayer(ExpSentriesMod, "ESPlayer"); Type esPlayerType = esPlayer.GetType(); // Sentry Damage FieldInfo sentryDamage = esPlayerType.GetField("sentryDamage", BindingFlags.Instance | BindingFlags.Public); float oldSentryDamage = (float)sentryDamage.GetValue(esPlayer); sentryDamage.SetValue(esPlayer, oldSentryDamage + .09f); // Sentry Range FieldInfo sentryRange = esPlayerType.GetField("sentryRange", BindingFlags.Instance | BindingFlags.Public); float oldSentryRange = (float)sentryRange.GetValue(esPlayer); sentryRange.SetValue(esPlayer, oldSentryRange + .15f); // Sentry Speed FieldInfo sentrySpeed = esPlayerType.GetField("sentrySpeed", BindingFlags.Instance | BindingFlags.Public); float oldSentrySpeed = (float)sentrySpeed.GetValue(esPlayer); sentrySpeed.SetValue(esPlayer, oldSentrySpeed + .075f); player.maxTurrets += 2; accPlayer.defenderAbility1Damage = 250; } }
public override void UpdateAccessory(Player player, bool hideVisual) { ACCPlayer accPlayer = Main.player[player.whoAmI].GetModPlayer <ACCPlayer>(); if (EsperClassMod != null) { player.GetModPlayer <ApacchiisClassesMod.MyPlayer>().hasEquippedClass = true; accPlayer.hasEsper = true; accPlayer.hasClassPath2 = true; //Reflection for cross-mod compatability without hard references ModPlayer ECPlayer = player.GetModPlayer(EsperClassMod, "ECPlayer"); Type ECPlayerType = ECPlayer.GetType(); // Telekinetic Damage FieldInfo tkDamage = ECPlayerType.GetField("tkDamage", BindingFlags.Instance | BindingFlags.Public); float oldtkDamage = (float)tkDamage.GetValue(ECPlayer); tkDamage.SetValue(ECPlayer, oldtkDamage + 0.245f); // Telekinetic Crit FieldInfo tkCrit = ECPlayerType.GetField("tkCrit", BindingFlags.Instance | BindingFlags.Public); int oldtkCrit = (int)tkCrit.GetValue(ECPlayer); tkCrit.SetValue(ECPlayer, oldtkCrit + 14); // Telekinetic Velocity FieldInfo tkVel = ECPlayerType.GetField("tkVel", BindingFlags.Instance | BindingFlags.Public); float oldtkVel = (float)tkVel.GetValue(ECPlayer); tkVel.SetValue(ECPlayer, oldtkVel + 0.7f); // Max Psychosis FieldInfo maxPsychosis2 = ECPlayerType.GetField("maxPsychosis2", BindingFlags.Instance | BindingFlags.Public); int oldmaxPsychosis2 = (int)maxPsychosis2.GetValue(ECPlayer); maxPsychosis2.SetValue(ECPlayer, oldmaxPsychosis2 + 5); } }
public override void UpdateAccessory(Player player, bool hideVisual) { ACCPlayer accPlayer = Main.player[player.whoAmI].GetModPlayer <ACCPlayer>(); var acmPlayer = player.GetModPlayer <ApacchiisClassesMod.MyPlayer>(); acmPlayer.hasEquippedClass = true; accPlayer.hasSpellblade = true; accPlayer.hasClassPath2 = true; if (player.HeldItem.magic) { player.magicDamage += .098f; player.manaCost -= .086f; player.statManaMax2 += 28; } if (player.HeldItem.melee) { player.magicDamage += .126f; player.meleeCrit += 7; } accPlayer.shokkZoneTimerBase = 50; accPlayer.magicBladeBaseDamage = 45; accPlayer.magicBladeBaseCost = 22; player.manaCost -= .08f; }
public override void UpdateAccessory(Player player, bool hideVisual) { ACCPlayer accPlayer = Main.player[player.whoAmI].GetModPlayer <ACCPlayer>(); player.GetModPlayer <ApacchiisClassesMod.MyPlayer>().hasEquippedClass = true; // Necessary so players cant equip multiple classes at the same time accPlayer.hasExplorer = true; // Update ModPlayer's "hasExplorer" to true so we can make/use abilities/passives player.allDamage += .012f; player.moveSpeed += .01f; player.pickSpeed += .015f; player.statDefense += 1; }
public override void UpdateAccessory(Player player, bool hideVisual) { ACCPlayer accPlayer = Main.player[player.whoAmI].GetModPlayer <ACCPlayer>(); player.GetModPlayer <ApacchiisClassesMod.MyPlayer>().hasEquippedClass = true; accPlayer.hasExplorer = true; player.allDamage += .024f; player.moveSpeed += .02f; player.pickSpeed += .03f; player.statDefense += 2; }
public override void UpdateAccessory(Player player, bool hideVisual) { ACCPlayer accPlayer = Main.player[player.whoAmI].GetModPlayer <ACCPlayer>(); player.GetModPlayer <ApacchiisClassesMod.MyPlayer>().hasEquippedClass = true; // Necessary so players cant equip multiple classes at the same time accPlayer.hasExplorer = true; // Update ModPlayer's "hasExplorer" to true so we can make/use abilities/passives accPlayer.hasClassPath2 = true; // This is how you make paths work, this is necessary if the path changes something that changes anything in the ModPlayer class such as an ability's base damage or base cooldown // Otherwise, if the path only grants something like Ability Damage, this variable is not really needed since you only have to do something like on the line below in this file // accPlayer.abilityDamage += .2f <-- +20% Ability Damage player.allDamage += .06f; player.moveSpeed += .09f; player.pickSpeed += .075f; player.statDefense += 10; }