Esempio 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);
        }
Esempio n. 2
0
        public LiveMonster(int level, Monster mon, Point point, bool isLeft)
        {
            Id     = World.WorldInfoManager.GetCardFakeId();
            Level  = level;
            Avatar = mon;
            Avatar.UpgradeToLevel(level);

            Position     = point;
            IsLeft       = isLeft;
            Action       = 0;
            roundPast    = 0;
            HpBar        = new HpBar(this);
            SkillManager = new SkillManager(this);
            AttackType   = (int)CardElements.None;
            CanAttack    = true;

            BuffManager        = new BuffManager(this);
            aiController       = new MonsterAi(this);
            LiveMonsterToolTip = new LiveMonsterToolTip(this);

            SetBasicData();
            HpBar.SetHp(Avatar.Hp);
            MonsterCoverBox = new MonsterCoverBox(this);
        }