public Power(AttackTypeEnum attackType, string name, int attackPower, int successRate)
     : base(name)
 {
     this.SuccessRate = successRate;
     this.AttackPower = attackPower;
     this.AttackType = attackType;
 }
Beispiel #2
0
 public OnAttackMessage(uint netId, AttackTypeEnum type, Vector3 targetPosition,
                        uint targetNetId) : base(netId)
 {
     this.attackType     = type;
     this.targetPosition = targetPosition;
     this.targetNetId    = targetNetId;
 }
Beispiel #3
0
 void Awake()
 {
     LifeMax  = __lifeMax;
     Life     = LifeMax;
     Defense  = __defense;
     Weakness = __weakness;
 }
Beispiel #4
0
 public Power(AttackTypeEnum attackType, string name, int attackPower, int successRate)
     : base(name)
 {
     this.SuccessRate = successRate;
     this.AttackPower = attackPower;
     this.AttackType  = attackType;
 }
 void Awake()
 {
     LifeMax = __lifeMax;
     Life = LifeMax;
     Defense = __defense;
     Weakness = __weakness;
 }
Beispiel #6
0
 public MonsterAttack(string name, string image, int effect, TypeEnum type, AttackTypeEnum attackType)
 {
     Name = name;
     Image = image;
     Effect = effect;
     Type = type;
     AttackType = attackType;
 }
Beispiel #7
0
 public MonsterAttack(string name, string image, int effect, TypeEnum type, AttackTypeEnum attackType)
 {
     Name       = name;
     Image      = image;
     Effect     = effect;
     Type       = type;
     AttackType = attackType;
 }
Beispiel #8
0
 public void PlayerSelectSkill()
 {
     if (player.skillUse >= 0)
     {
         playerAction = AttackTypeEnum.Skill;
         currentState = GameState.PlayerTarget;
     }
 }
 public SkillStruct(int cid, string name, string nameKor, string animSet, AttackTypeEnum attackType, string abnormal)
 {
     this.cid        = cid;
     this.name       = name;
     this.nameKor    = nameKor;
     this.animset    = animSet;
     this.attackType = attackType;
     this.abnormal   = abnormal;
 }
        public void OnDamageDone(AttackTypeEnum type, int damage)
        {
            if (Weakness == type) {
                Life -= Mathf.FloorToInt(1.3f * (damage - Defense));
            } else {
                Life -= damage - Defense;
            }

            if (IsDead()) {
                Destroy(gameObject);
            }
        }
Beispiel #11
0
 internal static string GetTypeColor(AttackTypeEnum attackType)
 {
     switch (attackType)
     {
         case (AttackTypeEnum.ATT):
             return "#FFEF9A9A";
         case (AttackTypeEnum.DEF):
             return "#FFC5CAE9";
         case (AttackTypeEnum.SPEATT):
             return "#FFC62828";
         case (AttackTypeEnum.SPEDEF):
             return "#FF283593";
     }
     return "#FFFFFFFF";
 }
Beispiel #12
0
        public void OnDamageDone(AttackTypeEnum type, int damage)
        {
            if (Weakness == type)
            {
                Life -= Mathf.FloorToInt(1.3f * (damage - Defense));
            }
            else
            {
                Life -= damage - Defense;
            }

            if (IsDead())
            {
                Destroy(gameObject);
            }
        }
Beispiel #13
0
    /**
     * METHODS
     */
    public static float ArmorDamageReduction(AttackTypeEnum attackType, ArmorTypeEnum armorType, float armorAmount)
    {
        float typeReduction = GetSpecificArmorReduction(attackType, armorType);
        float reduction     = armorAmount * ArmorReductionMultiplier;

        if (armorAmount >= 0f)
        {
            reduction = 1f - (reduction / (1f + reduction));
        }
        else
        {
            reduction = 2f - Mathf.Pow(1f - ArmorReductionMultiplier, -armorAmount);
        }

        return(reduction * typeReduction);
    }
 public TubeStyleStruct(int cid, string name, string nameKor, SocketEnum socket, TubeGradeEnum grade, string company, float range, AttackTypeEnum attackType, string position, float damage, int combo, bool hold, string holdmotion, float coolTime)
 {
     this.cid        = cid;
     this.name       = name;
     this.nameKor    = nameKor;
     this.socket     = socket;
     this.grade      = grade;
     this.company    = company;
     this.range      = range;
     this.attackType = attackType;
     this.position   = position;
     this.damage     = damage;
     this.combo      = combo;
     this.hold       = hold;
     this.holdmotion = holdmotion;
     this.coolTime   = coolTime;
 }
Beispiel #15
0
        internal static string GetTypeColor(AttackTypeEnum attackType)
        {
            switch (attackType)
            {
            case (AttackTypeEnum.ATT):
                return("#FFEF9A9A");

            case (AttackTypeEnum.DEF):
                return("#FFC5CAE9");

            case (AttackTypeEnum.SPEATT):
                return("#FFC62828");

            case (AttackTypeEnum.SPEDEF):
                return("#FF283593");
            }
            return("#FFFFFFFF");
        }
Beispiel #16
0
 public void PlayerSelectAttack()
 {
     playerAction = AttackTypeEnum.Attack;
     currentState = GameState.PlayerTarget;
 }
 public SpecialPower(AttackTypeEnum attackType, string name, int price, int attackPower, int successRate)
     : base(attackType, name, attackPower, successRate)
 {
     this.Price = price;
 }
Beispiel #18
0
 public void PlayerSelectDefense()
 {
     playerAction = AttackTypeEnum.Defense;
     currentState = GameState.PlayerTarget;
 }
Beispiel #19
0
 public static float GetSpecificArmorReduction(AttackTypeEnum attackType, ArmorTypeEnum armorType)
 {
     return(attackTypeVsArmorTypeMultiplier[(int)attackType, (int)armorType]);
 }
Beispiel #20
0
 public SpecialPower(AttackTypeEnum attackType, string name, int price, int attackPower, int successRate)
     : base(attackType, name, attackPower, successRate)
 {
     this.Price = price;
 }