Пример #1
0
    public virtual void SetMaxDefbyRank(ItemManager.Rank rank)
    {
        switch (rank)
        {
        case ItemManager.Rank.Common: defensivePowerMax = defensivePowerMin * 2 - 1; break;

        case ItemManager.Rank.Rare: defensivePowerMax = defensivePowerMin * 3 - 2; break;

        case ItemManager.Rank.Legendary: defensivePowerMax = defensivePowerMin * 4 - 3; break;

        default: defensivePowerMax = defensivePowerMin; Debug.Log("무기 공격력 최댓값 설정 오류"); break;
        }
    }
Пример #2
0
    public virtual void SetMaxAtkbyRank(ItemManager.Rank rank)
    {
        switch (rank)
        {
        case ItemManager.Rank.Common: attackPowerMax = attackPowerMin * 2 - 1; break;

        case ItemManager.Rank.Rare: attackPowerMax = attackPowerMin * 3 - 2; break;

        case ItemManager.Rank.Legendary: attackPowerMax = attackPowerMin * 4 - 3; break;

        default: attackPowerMax = attackPowerMin; Debug.Log("무기 공격력 최댓값 설정 오류"); break;
        }
    }
Пример #3
0
    public void setRank(ItemManager.ItemCategory category)
    {
        BoardManager boardManager = GameObject.Find("BoardManager").GetComponent <BoardManager>();
        ItemManager  itemManager  = GameObject.Find("ItemManager").GetComponent <ItemManager>();

        int floor = boardManager.WhichFloor;
        int cPer  = 77 - 7 * floor;
        int rPer  = 20 + 5 * floor;
        int lPer  = 3 + 2 * floor;

        UnityEngine.Random.InitState((int)System.DateTime.Now.Ticks);

        int  rand    = UnityEngine.Random.Range(0, 100);
        bool rankSet = false;

        while (!rankSet)
        {
            rand = UnityEngine.Random.Range(0, 100);
            if (rand < cPer)
            {
                if (itemManager.cEquip.Contains(category))
                {
                    rankSet = true;
                    rank    = ItemManager.Rank.Common;
                }
            }
            else if (rand < cPer + rPer)
            {
                if (itemManager.rEquip.Contains(category))
                {
                    rankSet = true;
                    rank    = ItemManager.Rank.Rare;
                }
            }
            else
            {
                if (itemManager.lEquip.Contains(category))
                {
                    rankSet = true;
                    rank    = ItemManager.Rank.Legendary;
                }
            }
        }
        Debug.Log(name + "의 등급은" + rank.ToString());
    }
Пример #4
0
 public override void SetMaxAtkbyRank(ItemManager.Rank rank)
 {
 }