// clear a single transformation buff from the target player public static void RemoveTransformation(Player player, string buffKeyName) { BuffInfo buff = GetBuffByKeyName(buffKeyName); player.ClearBuff(buff.GetBuffId()); if (!Main.dedServ && Main.netMode == NetmodeID.MultiplayerClient && player.whoAmI == Main.myPlayer) { NetworkHelper.formSync.SendFormChanges(256, player.whoAmI, player.whoAmI, buffKeyName, 0); } }
public static void AddTransformation(Player player, string buffKeyName, int duration) { BuffInfo buff = GetBuffByKeyName(buffKeyName); player.AddBuff(buff.GetBuffId(), ABSURDLY_LONG_BUFF_DURATION, false); if (!string.IsNullOrEmpty(buff.TransformationText)) { CombatText.NewText(player.Hitbox, buff.TransformationTextColor, buff.TransformationText, false, false); } if (!Main.dedServ && Main.netMode == NetmodeID.MultiplayerClient && player.whoAmI == Main.myPlayer) { NetworkHelper.formSync.SendFormChanges(256, player.whoAmI, player.whoAmI, buffKeyName, duration); } // start the transformation animation, if one exists. This auto cancels if nothing is there to play. player.GetModPlayer <MyPlayer>().IsTransformationAnimationPlaying = true; }
// whether the buff ID is Kaioken public static bool IsSuperKaioken(BuffInfo buff) { return(buff.GetBuffId() == SuperKaioken.GetBuffId()); }
// whether the buff is SSJG, specifically public static bool IsSSJG(BuffInfo buff) { return(SSJG.GetBuffId() == buff.GetBuffId()); }
// FAIRY special state, whether the player is in Nuova's Dev form, SPECTRUM, which is fabulous. public static bool IsSpectrum(BuffInfo buff) { return(Spectrum.GetBuffId() == buff.GetBuffId()); }