Exemplo n.º 1
0
        public void Transform(int monId)
        {
            if (IsHero)
            {
                NLog.Warn("hero cannot be Transform");
                return;
            }

            int cardId      = Weapon == null ? 0 : Weapon.CardId;
            var savedWeapon = Weapon == null ? null : Weapon.GetCopy();

            DeleteWeapon();
            int lifp = Life * 100 / Avatar.Hp;

            MonsterCoverBox.RemoveAllCover();
            SkillManager.CheckRemoveEffect();
            OwnerPlayer.State.CheckMonsterEvent(false, this);
            Avatar = new Monster(monId);
            Avatar.UpgradeToLevel(Level);
            OwnerPlayer.State.CheckMonsterEvent(true, this);
            SetBasicData();
            MonsterCoverBox.CheckCover();
            SkillManager.CheckInitialEffect();
            if (cardId > 0)
            {
                AddWeapon(savedWeapon);
            }
            HpBar.SetHp(Avatar.Hp * lifp / 100);
        }
Exemplo n.º 2
0
        public void Revive()
        {
            GhostTime = 0;
            BattleManager.Instance.MemMap.GetMouseCell(Position.X, Position.Y).UpdateOwner(Id);
            HpBar.SetHp(1);//复活给1hp

            SkillManager.CheckInitialEffect();
        }
Exemplo n.º 3
0
 public void OnInit()
 {
     SkillManager.CheckInitialEffect();
     MakeSound(true);
 }