예제 #1
0
        public override bool UseItem(Player player)
        {
            HungryPlayer p = player.GetModPlayer <HungryPlayer>();

            p.isHungry = false;
            // player.AddBuff(mod.BuffType("HungerModeBuff"), 3600 * 10);
            return(base.UseItem(player));
        }
예제 #2
0
        public override void Update(Player player, ref int buffIndex)
        {
            HungryPlayer p = player.GetModPlayer <HungryPlayer>();

            if (!p.isHungry)
            {
                player.meleeDamage -= player.meleeDamage * 0.10f;
                player.statDefense -= player.statDefense * (int)0.10;
                player.GetModPlayer <HungryPlayer>().isHungry = true;

                int buf = mod.BuffType("HungerModeBuff");
                player.AddBuff(buf, 3600 * 10);
            }
            else
            {
                // fails if we get here, log something
            }
        }