Exemplo n.º 1
0
        // 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);
            }
        }
Exemplo n.º 2
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;
        }
Exemplo n.º 3
0
 // whether the buff ID is Kaioken
 public static bool IsSuperKaioken(BuffInfo buff)
 {
     return(buff.GetBuffId() == SuperKaioken.GetBuffId());
 }
Exemplo n.º 4
0
 // whether the buff is SSJG, specifically
 public static bool IsSSJG(BuffInfo buff)
 {
     return(SSJG.GetBuffId() == buff.GetBuffId());
 }
Exemplo n.º 5
0
 // 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());
 }