Ejemplo n.º 1
0
    void SwitchShow()
    {
        if (attrAdd == null)
        {
            return;
        }
        if (showAttrTime == true)
        {
            labelHpAdd.text  = attrAdd.getWholeHp() == 0 ? "" : (" + " + attrAdd.getWholeHp());
            labelAttAdd.text = attrAdd.getWholeAtt() == 0 ? "" : (" + " + attrAdd.getWholeAtt());
            labelDefAdd.text = attrAdd.getWholeDEF() == 0 ? "" : (" + " + attrAdd.getWholeDEF());
            labelMagAdd.text = attrAdd.getWholeMAG() == 0 ? "" : (" + " + attrAdd.getWholeMAG());
            labelAgiAdd.text = attrAdd.getWholeAGI() == 0 ? "" : (" + " + attrAdd.getWholeAGI());
        }
        else
        {
            int hpl = CardManagerment.Instance.getCardAttrAppendLevel(showCard, AttributeType.hp);
            labelHpAdd.text = hpl == 0 ? "" : (" + Lv." + hpl);

            int attl = CardManagerment.Instance.getCardAttrAppendLevel(showCard, AttributeType.attack);
            labelAttAdd.text = attl == 0 ? "" : (" + Lv." + attl);

            int defl = CardManagerment.Instance.getCardAttrAppendLevel(showCard, AttributeType.defecse);
            labelDefAdd.text = defl == 0 ? "" : (" + Lv." + defl);

            int magl = CardManagerment.Instance.getCardAttrAppendLevel(showCard, AttributeType.magic);
            labelMagAdd.text = magl == 0 ? "" : (" + Lv." + magl);

            int dexl = CardManagerment.Instance.getCardAttrAppendLevel(showCard, AttributeType.agile);
            labelAgiAdd.text = dexl == 0 ? "" : (" + Lv." + dexl);
        }
    }
Ejemplo n.º 2
0
    private void showNewInfo(Card oldCard, Card newCard)
    {
        CardBaseAttribute attrNew = CardManagerment.Instance.getCardAllWholeAttr(newCard);
        CardBaseAttribute attr    = CardManagerment.Instance.getCardAllWholeAttr(oldCard);

        newMsgLabel[0].text = attr.getWholeHp().ToString();
        newMsgLabel[1].text = attr.getWholeAtt().ToString();
        newMsgLabel[2].text = attr.getWholeDEF().ToString();
        newMsgLabel[3].text = attr.getWholeMAG().ToString();
        newMsgLabel[4].text = attr.getWholeAGI().ToString();
        newMsgLabel[5].text = "Lv." + oldCard.getMaxLevel();
        TweenLabelNumber tl = TweenLabelNumber.Begin(combat.gameObject, 0.5f, newCard.getCardCombat());

        //		combat.text =  newCard.getCardCombat ().ToString();
        newAddMsgLabel[0].text = (attrNew.getWholeHp() - attr.getWholeHp()) >= 0 ? " + " + (attrNew.getWholeHp() - attr.getWholeHp()) : (attrNew.getWholeHp() - attr.getWholeHp()) + "";
        newAddMsgLabel[1].text = (attrNew.getWholeAtt() - attr.getWholeAtt()) >= 0 ? " + " + (attrNew.getWholeAtt() - attr.getWholeAtt()) : (attrNew.getWholeAtt() - attr.getWholeAtt()) + "";
        newAddMsgLabel[2].text = (attrNew.getWholeDEF() - attr.getWholeDEF()) >= 0 ? " + " + (attrNew.getWholeDEF() - attr.getWholeDEF()) : (attrNew.getWholeDEF() - attr.getWholeDEF()) + "";
        newAddMsgLabel[3].text = (attrNew.getWholeMAG() - attr.getWholeMAG()) >= 0 ? " + " + (attrNew.getWholeMAG() - attr.getWholeMAG()) : (attrNew.getWholeMAG() - attr.getWholeMAG()) + "";
        newAddMsgLabel[4].text = (attrNew.getWholeAGI() - attr.getWholeAGI()) >= 0 ? " + " + (attrNew.getWholeAGI() - attr.getWholeAGI()) : (attrNew.getWholeAGI() - attr.getWholeAGI()) + "";
        newAddMsgLabel[5].text = (newCard.getMaxLevel() - oldCard.getMaxLevel()) >= 0 ? " + " + (newCard.getMaxLevel() - oldCard.getMaxLevel()) : (newCard.getMaxLevel() - oldCard.getMaxLevel()) + "";
        int addQ = newCard.getQualityId() - oldCard.getQualityId();

        if (addQ != 0)
        {
            addQuality.text = LanguageConfigManager.Instance.getLanguage("beastSummonShow11") + "+" + addQ;
        }
        else
        {
            addQuality.text = "";
        }
        buttonSkills[1].initSkillData(newCard.getSkills()[0], ButtonSkill.STATE_LEARNED);
    }
Ejemplo n.º 3
0
    public void updateBeast(BeastEvolve chooseItem)
    {
        if (chooseItem == null)
        {
            return;
        }

        if (iscacheAudioOK && AudioManager.Instance.IsAudioOpen)
        {
            playGoddessSound(chooseItem);
        }

        updateSelectedCard(chooseItem);
        changeButton();
        updateCondition(chooseItem);
        level.text = "Lv." + selectedCard.getLevel() + "/" + selectedCard.getMaxLevel();
        int  expSid = selectedCard.getEXPSid();
        long _exp   = selectedCard.getEXP();
        long nowExp = EXPSampleManager.Instance.getNowEXPShow(expSid, _exp);
        long maxExp = EXPSampleManager.Instance.getMaxEXPShow(expSid, _exp);

        expbar.updateValue(nowExp, maxExp);

        if (evolveCard != null && evolveCard.getEXP() > 0)
        {
            CardBaseAttribute oldAttr = CardManagerment.Instance.getCardWholeAttr(evolveCard);
            CardBaseAttribute newAttr = CardManagerment.Instance.getCardWholeAttr(selectedCard);
            hp.text     = oldAttr.getWholeHp().ToString();
            att.text    = oldAttr.getWholeAtt().ToString();
            def.text    = oldAttr.getWholeDEF().ToString();
            mag.text    = oldAttr.getWholeMAG().ToString();
            dex.text    = oldAttr.getWholeAGI().ToString();
            jinhua.text = (evolveCard.getQualityId() - 1).ToString() + "/4";
            hp.text    += "[64ED6E]" + " + " + (newAttr.getWholeHp() - oldAttr.getWholeHp()).ToString() + "[-]";
            att.text   += "[64ED6E]" + " + " + (newAttr.getWholeAtt() - oldAttr.getWholeAtt()).ToString() + "[-]";
            def.text   += "[64ED6E]" + " + " + (newAttr.getWholeDEF() - oldAttr.getWholeDEF()).ToString() + "[-]";
            mag.text   += "[64ED6E]" + " + " + (newAttr.getWholeMAG() - oldAttr.getWholeMAG()).ToString() + "[-]";
            dex.text   += "[64ED6E]" + " + " + (newAttr.getWholeAGI() - oldAttr.getWholeAGI()).ToString() + "[-]";
            evolveCard  = null;
        }
        else
        {
            CardBaseAttribute attr = CardManagerment.Instance.getCardWholeAttr(selectedCard);
            hp.text  = attr.getWholeHp().ToString();
            att.text = attr.getWholeAtt().ToString();
            def.text = attr.getWholeDEF().ToString();
            mag.text = attr.getWholeMAG().ToString();
            dex.text = attr.getWholeAGI().ToString();

            jinhua.text = (selectedCard.getQualityId() - 1).ToString() + "/4";
        }

        titleName = "horStar" + selectedCard.getTitleName(selectedCard.sid);
        setTitle(titleName, selectedCard.getName());
        quality.spriteName = QualityManagerment.qualityIDToStringByBG(selectedCard.getQualityId());
        quality.gameObject.SetActive(true);
        string str = LanguageConfigManager.Instance.getLanguage("s0371");

        InitSkill();
    }
Ejemplo n.º 4
0
 public void showUI(Card beforeCard, CardBaseAttribute beforeEvoAttr, Card afterCard, CardBaseAttribute afterEvoAttr)
 {
     showLevelValue(beforeCard.getMaxLevel(), beforeCard.getMaxLevel());
     showLifeValue(beforeEvoAttr.getWholeHp(), beforeEvoAttr.getWholeHp());
     showAttackValue(beforeEvoAttr.getWholeAtt(), beforeEvoAttr.getWholeAtt());
     showDefendValue(beforeEvoAttr.getWholeDEF(), beforeEvoAttr.getWholeDEF());
     showMagicValue(beforeEvoAttr.getWholeMAG(), beforeEvoAttr.getWholeMAG());
     showAgileValue(beforeEvoAttr.getWholeAGI(), beforeEvoAttr.getWholeAGI());
     showMainSkill(beforeCard, afterCard);
 }
Ejemplo n.º 5
0
    private void evolutionOver()
    {
        fristIn = false;
        Card oldCard = mainCard.Clone() as Card;

        oldCard.updateEvoLevel(mainCard.getEvoLevel() - 1);
        attrOldEff = CardManagerment.Instance.getCardAllWholeAttr(oldCard);
        attrNewEff = CardManagerment.Instance.getCardAllWholeAttr(mainCard);
        _oldAttr   = new int[5] {
            attrOldEff.getWholeHp(), attrOldEff.getWholeAtt(), attrOldEff.getWholeDEF(), attrOldEff.getWholeMAG(), attrOldEff.getWholeAGI()
        };
        _newAttr = new int[5] {
            attrNewEff.getWholeHp(), attrNewEff.getWholeAtt(), attrNewEff.getWholeDEF(), attrNewEff.getWholeMAG(), attrNewEff.getWholeAGI()
        };
        _addAttr = new int[5] {
            (attrNewEff.getWholeHp() - attrOldEff.getWholeHp()), (attrNewEff.getWholeAtt() - attrOldEff.getWholeAtt()), (attrNewEff.getWholeDEF() - attrOldEff.getWholeDEF())
            , (attrNewEff.getWholeMAG() - attrOldEff.getWholeMAG()), (attrNewEff.getWholeAGI() - attrOldEff.getWholeAGI())
        };
        _step = new int[5] {
            setStep(attrOldEff.getWholeHp(), attrNewEff.getWholeHp()), setStep(attrOldEff.getWholeAtt(), attrNewEff.getWholeAtt()), setStep(attrOldEff.getWholeDEF(), attrNewEff.getWholeDEF()),
            setStep(attrOldEff.getWholeMAG(), attrNewEff.getWholeMAG()), setStep(attrOldEff.getWholeAGI(), attrNewEff.getWholeAGI())
        };

        initStar();
        step       = 0;
        nextSetp   = 1;
        canRefresh = true;
    }
Ejemplo n.º 6
0
    /// <summary>
    /// 卡片或者召唤兽单个属性战斗力计算
    /// </summary>
    private double getCardAttrCombat(Card _card, int _coeType)
    {
        CardBaseAttribute attr = CardManagerment.Instance.getCardAllWholeAttr(_card);

        switch (_coeType)
        {
        case COE_HP:
            double hp    = attr.getWholeHp();
            double coehp = getCombatSampleBySid(_card.getJob()).hpCoe;
            return((int)(hp * coehp));

        case COE_ATT:
            double att    = attr.getWholeAtt();
            double coeAtt = getCombatSampleBySid(_card.getJob()).attCoe;
            return((int)(att * coeAtt));

        case COE_DEF:
            double def    = attr.getWholeDEF();
            double coeDef = getCombatSampleBySid(_card.getJob()).defCoe;
            return((int)(def * coeDef));

        case COE_MAG:
            double mag    = attr.getWholeMAG();
            double coeMag = getCombatSampleBySid(_card.getJob()).magCoe;
            return((int)(mag * coeMag));

        case COE_AGI:
            double agi    = attr.getWholeAGI();
            double coeAgi = getCombatSampleBySid(_card.getJob()).agiCoe;
            return((int)(agi * coeAgi));

        default:
            return(0);
        }
    }
Ejemplo n.º 7
0
    /// <summary>
    /// 更新属性
    /// </summary>
    private void updateAttributes()
    {
        rushCombat();
        CardBaseAttribute attr  = CardManagerment.Instance.getCardWholeAttr(card);
        CardBaseAttribute attr2 = CardManagerment.Instance.getCardAppendEffectNoSuit(card);

        attrLabels [0].text = attr.getWholeHp().ToString();
        attrLabels [1].text = attr.getWholeAtt().ToString();
        attrLabels [2].text = attr.getWholeDEF().ToString();
        attrLabels [3].text = attr.getWholeMAG().ToString();
        attrLabels [4].text = attr.getWholeAGI().ToString();
        if (showAttrTime == true)
        {
            addAttrLabels [0].text = " + " + attr2.getWholeHp().ToString();
            addAttrLabels [1].text = " + " + attr2.getWholeAtt().ToString();
            addAttrLabels [2].text = " + " + attr2.getWholeDEF().ToString();
            addAttrLabels [3].text = " + " + attr2.getWholeMAG().ToString();
            addAttrLabels [4].text = " + " + attr2.getWholeAGI().ToString();
        }
        else
        {
            string fj = LanguageConfigManager.Instance.getLanguage("s0141");
            addAttrLabels [0].text = CardManagerment.Instance.getCardAttrAppendLevel(card, AttributeType.hp) != 0 ? fj + "Lv." + CardManagerment.Instance.getCardAttrAppendLevel(card, AttributeType.hp) : "";
            addAttrLabels [1].text = CardManagerment.Instance.getCardAttrAppendLevel(card, AttributeType.attack) != 0 ? fj + "Lv." + CardManagerment.Instance.getCardAttrAppendLevel(card, AttributeType.attack) : "";
            addAttrLabels [2].text = CardManagerment.Instance.getCardAttrAppendLevel(card, AttributeType.defecse) != 0 ? fj + "Lv." + CardManagerment.Instance.getCardAttrAppendLevel(card, AttributeType.defecse) : "";
            addAttrLabels [3].text = CardManagerment.Instance.getCardAttrAppendLevel(card, AttributeType.magic) != 0 ? fj + "Lv." + CardManagerment.Instance.getCardAttrAppendLevel(card, AttributeType.magic) : "";
            addAttrLabels [4].text = CardManagerment.Instance.getCardAttrAppendLevel(card, AttributeType.agile) != 0 ? fj + "Lv." + CardManagerment.Instance.getCardAttrAppendLevel(card, AttributeType.agile) : "";
        }
    }
Ejemplo n.º 8
0
    /// <summary>
    /// 坐骑属性战斗力
    /// </summary>
    private double getMountsAttrCombat(Mounts mounts, int Type)
    {
        CardBaseAttribute attr = mounts.getMountsAddEffect();

        switch (Type)
        {
        case COE_HP:
            double hp    = attr.getWholeHp();
            double coehp = getCombatSampleBySid(MOUNTS_TYPE).hpCoe;
            return((int)(hp * coehp));

        case COE_ATT:
            double att    = attr.getWholeAtt();
            double coeAtt = getCombatSampleBySid(MOUNTS_TYPE).attCoe;
            return((int)(att * coeAtt));

        case COE_DEF:
            double def    = attr.getWholeDEF();
            double coeDef = getCombatSampleBySid(MOUNTS_TYPE).defCoe;
            return((int)(def * coeDef));

        case COE_MAG:
            double mag    = attr.getWholeMAG();
            double coeMag = getCombatSampleBySid(MOUNTS_TYPE).magCoe;
            return((int)(mag * coeMag));

        case COE_AGI:
            double agi    = attr.getWholeAGI();
            double coeAgi = getCombatSampleBySid(MOUNTS_TYPE).agiCoe;
            return((int)(agi * coeAgi));

        default:
            return(0);
        }
    }
Ejemplo n.º 9
0
 /** 计算属性附加数据 */
 void computeAddedValue(Card beforeCard, CardBaseAttribute beforeEvoAttr, Card afterCard, CardBaseAttribute afterEvoAttr)
 {
     levelAdded  = afterCard.getMaxLevel() - beforeCard.getMaxLevel();
     lifeAdded   = afterEvoAttr.getWholeHp() - beforeEvoAttr.getWholeHp();
     attackAdded = afterEvoAttr.getWholeAtt() - beforeEvoAttr.getWholeAtt();
     defendAdded = afterEvoAttr.getWholeDEF() - beforeEvoAttr.getWholeDEF();
     magicAdded  = afterEvoAttr.getWholeMAG() - beforeEvoAttr.getWholeMAG();
     agileAdded  = afterEvoAttr.getWholeAGI() - beforeEvoAttr.getWholeAGI();
 }
Ejemplo n.º 10
0
    //0生命,1攻击,2防御,3魔法,4敏捷,5等级上限,6战力
    private void showOldInfo(Card oldCard)
    {
        CardBaseAttribute attr = CardManagerment.Instance.getCardAllWholeAttr(oldCard);

        oldMsgLabel[0].text = attr.getWholeHp() + "";
        oldMsgLabel[1].text = attr.getWholeAtt() + "";
        oldMsgLabel[2].text = attr.getWholeDEF() + "";
        oldMsgLabel[3].text = attr.getWholeMAG() + "";
        oldMsgLabel[4].text = attr.getWholeAGI() + "";
    }
Ejemplo n.º 11
0
    private void initAttr()
    {
        CardBaseAttribute attr = CardManagerment.Instance.getCardAllWholeAttr(mainCard);

        attrNow[0].text = attr.getWholeHp() + "";
        attrNow[1].text = attr.getWholeAtt() + "";
        attrNow[2].text = attr.getWholeDEF() + "";
        attrNow[3].text = attr.getWholeMAG() + "";
        attrNow[4].text = attr.getWholeAGI() + "";
    }
Ejemplo n.º 12
0
    //0生命,1攻击,2防御,3魔法,4敏捷,5等级上限,6战力
    private void showNewInfo(Card oldCard, Card newCard)
    {
        CardBaseAttribute attrOld = CardManagerment.Instance.getCardAllWholeAttr(oldCard);
        CardBaseAttribute attrNew = CardManagerment.Instance.getCardAllWholeAttr(newCard);

        newMsgLabel[0].text = attrOld.getWholeHp() + " + " + Colors.GREEN + (attrNew.getWholeHp() - attrOld.getWholeHp());
        newMsgLabel[1].text = attrOld.getWholeAtt() + " + " + Colors.GREEN + (attrNew.getWholeAtt() - attrOld.getWholeAtt());
        newMsgLabel[2].text = attrOld.getWholeDEF() + " + " + Colors.GREEN + (attrNew.getWholeDEF() - attrOld.getWholeDEF());
        newMsgLabel[3].text = attrOld.getWholeMAG() + " + " + Colors.GREEN + (attrNew.getWholeMAG() - attrOld.getWholeMAG());
        newMsgLabel[4].text = attrOld.getWholeAGI() + " + " + Colors.GREEN + (attrNew.getWholeAGI() - attrOld.getWholeAGI());
    }
    private void showOldInfo(Card oldCard)
    {
        CardBaseAttribute attr = CardManagerment.Instance.getCardAllWholeAttr(oldCard);

        oldMsgLabel[0].text = attr.getWholeHp() + "";
        oldMsgLabel[1].text = attr.getWholeAtt() + "";
        oldMsgLabel[2].text = attr.getWholeDEF() + "";
        oldMsgLabel[3].text = attr.getWholeMAG() + "";
        oldMsgLabel[4].text = attr.getWholeAGI() + "";
        oldMsgLabel[5].text = "Lv." + oldCard.getMaxLevel();
//		oldMsgLabel [6].text = oldCard.getCardCombat ().ToString();

        buttonSkills[0].initSkillData(oldCard.getSkills()[0], ButtonSkill.STATE_LEARNED);
    }
Ejemplo n.º 14
0
    public void initUI(Card _showCard, string _color)
    {
        if (_showCard == null)
        {
            return;
        }
        this.showCard = _showCard;

        if (roleView != null)
        {
            roleView.init(showCard, null, null);
        }
        if (labelLevel != null)
        {
            labelLevel.text = "" + showCard.getMaxLevel();
        }
        if (labelEvoLevel != null)
        {
            labelEvoLevel.text = showCard.getEvoLevel() + " / " + showCard.getMaxEvoLevel();
        }
        if (labelCombat != null)
        {
            labelCombat.text = showCard.getCardCombat() + "";
        }

        CardBaseAttribute attr = CardManagerment.Instance.getCardWholeAttr(showCard);

        labelHp.text  = attr.getWholeHp().ToString();
        labelAtt.text = attr.getWholeAtt().ToString();
        labelDef.text = attr.getWholeDEF().ToString();
        labelMag.text = attr.getWholeMAG().ToString();
        labelAgi.text = attr.getWholeAGI().ToString();

        attrAdd = CardManagerment.Instance.getCardAppendEffectNoSuit(showCard);

        Skill[] mainSkil  = showCard.getSkills();
        Skill[] buffSkill = showCard.getBuffSkills();
        if (buffSkill != null && mainSkil == null)
        {
            mainSkillButton.initSkillData(buffSkill [0], ButtonSkill.STATE_LEARNED);
        }
        else if (buffSkill == null && mainSkil != null)
        {
            mainSkillButton.initSkillData(mainSkil [0], ButtonSkill.STATE_LEARNED);
        }
    }
Ejemplo n.º 15
0
    void updateAttrs()
    {
        for (int i = 0; i < attrLabel.Length; i++)  //清空属性信息
        {
            attrLabel[i].text       = "";
            evoAddAttrLabel[i].text = "";
        }
        describe.text = "";
        CardBaseAttribute cardAttr = CardManagerment.Instance.getCardAllWholeAttr(choosedCard);

        this.heroName.text = QualityManagerment.getQualityColor(choosedCard.getQualityId()) + choosedCard.getName();
        //卡片现在的属性
        attrLabel[0].text = cardAttr.getWholeHp() + "";
        attrLabel[1].text = cardAttr.getWholeAtt() + "";
        attrLabel[2].text = cardAttr.getWholeDEF() + "";
        attrLabel[3].text = cardAttr.getWholeMAG() + "";
        attrLabel[4].text = cardAttr.getWholeAGI() + "";
    }
Ejemplo n.º 16
0
    private void updateAttributes()
    {
        rushCombat();
        CardBaseAttribute attr  = CardManagerment.Instance.getCardWholeAttr(showCard);
        CardBaseAttribute attr2 = CardManagerment.Instance.getCardAppendEffectNoSuit(showCard);

        hp.text  = attr.getWholeHp().ToString();
        att.text = attr.getWholeAtt().ToString();
        def.text = attr.getWholeDEF().ToString();
        mag.text = attr.getWholeMAG().ToString();
        dex.text = attr.getWholeAGI().ToString();
        if (window != null)
        {
            hpAdd.text  = "";
            attAdd.text = "";
            defAdd.text = "";
            magAdd.text = "";
            dexAdd.text = "";
        }
        else
        {
            if (showAttrTime == true)
            {
                hpAdd.text  = " + " + attr2.getWholeHp().ToString();
                attAdd.text = " + " + attr2.getWholeAtt().ToString();
                defAdd.text = " + " + attr2.getWholeDEF().ToString();
                magAdd.text = " + " + attr2.getWholeMAG().ToString();
                dexAdd.text = " + " + attr2.getWholeAGI().ToString();
            }
            else
            {
                hpAdd.text  = " + Lv." + CardManagerment.Instance.getCardAttrAppendLevel(showCard, AttributeType.hp);
                attAdd.text = " + Lv." + CardManagerment.Instance.getCardAttrAppendLevel(showCard, AttributeType.attack);
                defAdd.text = " + Lv." + CardManagerment.Instance.getCardAttrAppendLevel(showCard, AttributeType.defecse);
                magAdd.text = " + Lv." + CardManagerment.Instance.getCardAttrAppendLevel(showCard, AttributeType.magic);
                dexAdd.text = " + Lv." + CardManagerment.Instance.getCardAttrAppendLevel(showCard, AttributeType.agile);
            }
        }
    }
    private void showNewInfo(Card oldCard, Card newCard)
    {
        CardBaseAttribute attrNew = CardManagerment.Instance.getCardAllWholeAttr(newCard);
        CardBaseAttribute attr    = CardManagerment.Instance.getCardAllWholeAttr(oldCard);

        newMsgLabel[0].text    = attr.getWholeHp().ToString();
        newMsgLabel[1].text    = attr.getWholeAtt().ToString();
        newMsgLabel[2].text    = attr.getWholeDEF().ToString();
        newMsgLabel[3].text    = attr.getWholeMAG().ToString();
        newMsgLabel[4].text    = attr.getWholeAGI().ToString();
        newMsgLabel[5].text    = "Lv." + oldCard.getMaxLevel();
        newAddMsgLabel[0].text = " + ?";
        newAddMsgLabel[1].text = " + ?";
        newAddMsgLabel[2].text = " + ?";
        newAddMsgLabel[3].text = " + ?";
        newAddMsgLabel[4].text = " + ?";
        newAddMsgLabel[5].text = " + ?";
        int addQ = newCard.getQualityId() - oldCard.getQualityId();

//		if(addQ != 0)
        addQuality.text = LanguageConfigManager.Instance.getLanguage("beastSummonShow11") + "+ ?";
        buttonSkills[1].initSkillData(newCard.getSkills()[0], ButtonSkill.STATE_LEARNED);
    }
Ejemplo n.º 18
0
    /// <summary>
    /// 队伍卡片单属性战斗力公式
    /// </summary>
    private int getTeamAttr(Card _card, Card _beastCard, int _coeType, int _loction)
    {
        CardBaseAttribute attr      = CardManagerment.Instance.getCardAllWholeAttrByTeam(_card);
        CardBaseAttribute attrPer   = CardManagerment.Instance.getCardAllWholeAttrPerByTeam(_card);
        CardBaseAttribute attrBeast = _beastCard == null ? null : CardManagerment.Instance.getCardAllWholeAttrByTeam(_beastCard);

        //这里计算星盘属性加成
        if (_loction == 1)
        {
            attr.mergeCardBaseAttr(GoddessAstrolabeManagerment.Instance.getAttrByFrontInteger());
            attrPer.mergeCardBaseAttr(GoddessAstrolabeManagerment.Instance.getAttrByFrontNumber());
        }
        else if (_loction == 2)
        {
            attr.mergeCardBaseAttr(GoddessAstrolabeManagerment.Instance.getAttrByMiddleInteger());
            attrPer.mergeCardBaseAttr(GoddessAstrolabeManagerment.Instance.getAttrByMiddleNumber());
        }
        else
        {
            attr.mergeCardBaseAttr(GoddessAstrolabeManagerment.Instance.getAttrByBehindInteger());
            attrPer.mergeCardBaseAttr(GoddessAstrolabeManagerment.Instance.getAttrByBehindNumber());
        }

//		MonoBase.print ("--------------------teamAttrPer>>>>>>>hp===" + attrPer.perHp + ",att=" + attrPer.perAttack + ",def=" + attrPer.perDefecse
//		                + ",mag=" + attrPer.perMagic + ",agi=" + attrPer.perAgile);

        switch (_coeType)
        {
        case COE_HP:
            double hp       = attr.getWholeHp();
            double beastHp  = _beastCard == null ? 0 : attrBeast.getWholeHp();
            double coeHpPer = attrPer.perHp;
            double coeHp    = getCombatSampleBySid(_card.getJob()).hpCoe;
            return(getTeamAttrsCombat(_card, hp, beastHp, coeHpPer, coeHp));

        case COE_ATT:
            double att       = attr.getWholeAtt();
            double beastAtt  = _beastCard == null ? 0 : attrBeast.getWholeAtt();
            double coeAttPer = attrPer.perAttack;
            double coeAtt    = getCombatSampleBySid(_card.getJob()).attCoe;
            return(getTeamAttrsCombat(_card, att, beastAtt, coeAttPer, coeAtt));

        case COE_DEF:
            double def       = attr.getWholeDEF();
            double beastDef  = _beastCard == null ? 0 : attrBeast.getWholeDEF();
            double coeDefPer = attrPer.perDefecse;
            double coeDef    = getCombatSampleBySid(_card.getJob()).defCoe;
            return(getTeamAttrsCombat(_card, def, beastDef, coeDefPer, coeDef));

        case COE_MAG:
            double mag       = attr.getWholeMAG();
            double beastMag  = _beastCard == null ? 0 : attrBeast.getWholeMAG();
            double coeMagPer = attrPer.perMagic;
            double coeMag    = getCombatSampleBySid(_card.getJob()).magCoe;
            return(getTeamAttrsCombat(_card, mag, beastMag, coeMagPer, coeMag));

        case COE_AGI:
            double agi       = attr.getWholeAGI();
            double beastAgi  = _beastCard == null ? 0 : attrBeast.getWholeAGI();
            double coeAgiPer = attrPer.perAgile;
            double coeAgi    = getCombatSampleBySid(_card.getJob()).agiCoe;
            return(getTeamAttrsCombat(_card, agi, beastAgi, coeAgiPer, coeAgi));

        default:
            return(0);
        }
    }
Ejemplo n.º 19
0
    public void bloodSuccessCallBack(BloodItemSample bis, Vector3 v3, int lineType)
    {
        bloodEffect[] blEffects = bis.effects;
        this.lineType = lineType;
        int hp = 0, attack = 0, defec = 0, magic = 0, agile = 0;//保存具体数值属性

        if (lineType == 0)
        {
            if (choosedCard.cardBloodLevel == BloodConfigManager.Instance.getTotalItemNum(choosedCard.sid) && choosedCard.getQualityId() == QualityType.MYTH)
            {
                for (int i = 0; i < blEffects.Length; i++)
                {
                    hp     += blEffects[i].hp;
                    attack += blEffects[i].attack;
                    defec  += blEffects[i].defec;
                    magic  += blEffects[i].magic;
                    agile  += blEffects[i].agile;
                }
                CardBaseAttribute cardAttr = CardManagerment.Instance.getCardAllWholeAttr(choosedCard);
                for (int i = 0; i < blEffects.Length; i++)
                {
                    hp     += (int)((cardAttr.getWholeHp() + hp) * ((float)blEffects[i].perhp / 100));
                    attack += (int)((cardAttr.getWholeAtt() + attack) * ((float)blEffects[i].perattack / 100));
                    defec  += (int)((cardAttr.getWholeDEF() + defec) * ((float)blEffects[i].perdefec / 100));
                    magic  += (int)((cardAttr.getWholeMAG() + magic) * ((float)blEffects[i].permagic / 100));
                    agile  += (int)((cardAttr.getWholeAGI() + agile) * ((float)blEffects[i].peragile / 100));
                }
                if (hp != 0)
                {
                    playerEffect(addLabel[0], evoAddAttrLabel[0], hp, 0);
                }
                if (attack != 0)
                {
                    playerEffect(addLabel[1], evoAddAttrLabel[1], attack, 1);
                }
                if (defec != 0)
                {
                    playerEffect(addLabel[2], evoAddAttrLabel[2], defec, 2);
                }
                if (magic != 0)
                {
                    playerEffect(addLabel[3], evoAddAttrLabel[3], magic, 3);
                }
                if (agile != 0)
                {
                    playerEffect(addLabel[4], evoAddAttrLabel[4], agile, 4);
                }
                StartCoroutine(Utils.DelayRun(() => {
                    if (BloodManagement.Instance.prizes != null && BloodManagement.Instance.prizes.Length > 0)
                    {
                        UiManager.Instance.openDialogWindow <BloodEvoWindow>((win => {
                            win.Initialize(BloodManagement.Instance.prizes);
                        }));
                    }
                }, 0.5f));
                return;
            }
            showQualityEvo();
        }
        if (blEffects[0].type == 5 || blEffects[0].type == 6)
        {
            if (blEffects[0].type == 5)
            {
                StartCoroutine(playSkillEffect(blEffects[0].skillSid, v3));
            }
            else
            {
                StartCoroutine(playSkillEffect(blEffects[0].drSkillSid, blEffects[0].skillSid, v3));
            }
        }
        else
        {
            for (int i = 0; i < blEffects.Length; i++)
            {
                hp     += blEffects[i].hp;
                attack += blEffects[i].attack;
                defec  += blEffects[i].defec;
                magic  += blEffects[i].magic;
                agile  += blEffects[i].agile;
            }
            CardBaseAttribute cardAttr = CardManagerment.Instance.getCardAllWholeAttr(choosedCard);
            for (int i = 0; i < blEffects.Length; i++)
            {
                hp     += (int)((cardAttr.getWholeHp() + hp) * ((float)blEffects[i].perhp / 100));
                attack += (int)((cardAttr.getWholeAtt() + attack) * ((float)blEffects[i].perattack / 100));
                defec  += (int)((cardAttr.getWholeDEF() + defec) * ((float)blEffects[i].perdefec / 100));
                magic  += (int)((cardAttr.getWholeMAG() + magic) * ((float)blEffects[i].permagic / 100));
                agile  += (int)((cardAttr.getWholeAGI() + agile) * ((float)blEffects[i].peragile / 100));
            }
            if (hp != 0)
            {
                playerEffect(addLabel[0], evoAddAttrLabel[0], hp, 0);
            }
            if (attack != 0)
            {
                playerEffect(addLabel[1], evoAddAttrLabel[1], attack, 1);
            }
            if (defec != 0)
            {
                playerEffect(addLabel[2], evoAddAttrLabel[2], defec, 2);
            }
            if (magic != 0)
            {
                playerEffect(addLabel[3], evoAddAttrLabel[3], magic, 3);
            }
            if (agile != 0)
            {
                playerEffect(addLabel[4], evoAddAttrLabel[4], agile, 4);
            }
        }
    }
Ejemplo n.º 20
0
    /// <summary>
    /// 更新可以加的属性值
    /// </summary>
    /// <param name="bps"></param>
    void updateChangeAttrs(BloodPointSample bps)
    {
        for (int i = 0; i < evoAddAttrLabel.Length; i++)  //不管什么情况都先清零在说
        {
            evoAddAttrLabel[i].text = "";
        }
        if (choosedCard.cardBloodLevel >= bps.maxLv)
        {
            return;                                                                                                    //没有满级才会显示
        }
        int             bloodItemSid = BloodConfigManager.Instance.getCurrentItemSid(bps, choosedCard.cardBloodLevel); //拿到具体的节点信息Sid
        BloodItemSample bis          = BloodItemConfigManager.Instance.getBolldItemSampleBySid(bloodItemSid);

        if (bis == null)
        {
            return;
        }
        bloodEffect[] blEffects = bis.effects;
        int           hp = 0, attack = 0, defec = 0, magic = 0, agile = 0;//保存具体数值属性

        for (int i = 0; i < blEffects.Length; i++)
        {
            hp     += blEffects[i].hp;
            attack += blEffects[i].attack;
            defec  += blEffects[i].defec;
            magic  += blEffects[i].magic;
            agile  += blEffects[i].agile;
        }
        CardBaseAttribute cardAttr = CardManagerment.Instance.getCardAllWholeAttr(choosedCard);

        for (int i = 0; i < blEffects.Length; i++)
        {
            if (blEffects[i].perhp == 0)
            {
                if (hp == 0)
                {
                    evoAddAttrLabel[0].text = "";
                }
                else
                {
                    evoAddAttrLabel[0].text = "+" + hp;
                }
            }
            else
            {
                evoAddAttrLabel[0].text = "+" + (cardAttr.getWholeHp() + hp) * (1.0f + (float)blEffects[i].perhp / 100);
            }
            if (blEffects[i].perattack == 0)
            {
                if (attack == 0)
                {
                    evoAddAttrLabel[1].text = "";
                }
                else
                {
                    evoAddAttrLabel[1].text = "+" + attack;
                }
            }
            else
            {
                evoAddAttrLabel[1].text = "+" + (cardAttr.getWholeAtt() + attack) * (1.0f + (float)blEffects[i].perattack / 100);
            }
            if (blEffects[i].perdefec == 0)
            {
                if (defec == 0)
                {
                    evoAddAttrLabel[2].text = "";
                }
                else
                {
                    evoAddAttrLabel[2].text = "+" + defec;
                }
            }
            else
            {
                evoAddAttrLabel[2].text = "+" + (cardAttr.getWholeDEF() + defec) * (1.0f + (float)blEffects[i].perdefec / 100);
            }
            if (blEffects[i].permagic == 0)
            {
                if (magic == 0)
                {
                    evoAddAttrLabel[3].text = "";
                }
                else
                {
                    evoAddAttrLabel[3].text = "+" + magic;
                }
            }
            else
            {
                evoAddAttrLabel[3].text = "+" + (cardAttr.getWholeMAG() + magic) * (1.0f + (float)blEffects[i].permagic / 100);
            }
            if (blEffects[i].peragile == 0)
            {
                if (agile == 0)
                {
                    evoAddAttrLabel[4].text = "";
                }
                else
                {
                    evoAddAttrLabel[4].text = "+" + agile;
                }
            }
            else
            {
                evoAddAttrLabel[4].text = "+" + (cardAttr.getWholeAGI() + agile) * (1.0f + (float)blEffects[i].peragile / 100);
            }
        }
    }
Ejemplo n.º 21
0
    //初始化,带入3大类技能的升级信息
    public void Initialize(Card role, LevelupInfo info, LevelupInfo[] msk, LevelupInfo[] bsk, LevelupInfo[] ask)
    {
        this.card            = role;
        this.mskillsLvUpInfo = msk;
        this.bskillsLvUpInfo = bsk;
        this.askillsLvUpInfo = ask;
        this.cardLvUpInfo    = info;
        oldCard         = info.orgData as Card;
        cardimage.alpha = 0;
        ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + role.getImageID(), cardimage);
        CardBaseAttribute attrOldEff = CardManagerment.Instance.getCardWholeAttr(oldCard);
        CardBaseAttribute attrNewEff = CardManagerment.Instance.getCardWholeAttr(role);
        CardBaseAttribute attrAddon  = CardManagerment.Instance.getCardAppendEffectNoSuit(role);

        _oldAttr = new int[5] {
            attrOldEff.getWholeHp(),
                attrOldEff.getWholeAtt(),
                attrOldEff.getWholeDEF(),
                attrOldEff.getWholeMAG(),
                attrOldEff.getWholeAGI()
        };
        _newAttr = new int[5] {
            attrNewEff.getWholeHp(),
                attrNewEff.getWholeAtt(),
                attrNewEff.getWholeDEF(),
                attrNewEff.getWholeMAG(),
                attrNewEff.getWholeAGI()
        };
        _addAttr = new int[5] {
            (attrNewEff.getWholeHp() - attrOldEff.getWholeHp()),
            (attrNewEff.getWholeAtt() - attrOldEff.getWholeAtt()),
            (attrNewEff.getWholeDEF() - attrOldEff.getWholeDEF())
            ,
            (attrNewEff.getWholeMAG() - attrOldEff.getWholeMAG()),
            (attrNewEff.getWholeAGI() - attrOldEff.getWholeAGI())
        };
        _step = new int[5] {
            setStep(attrOldEff.getWholeHp(), attrNewEff.getWholeHp()),
            setStep(attrOldEff.getWholeAtt(), attrNewEff.getWholeAtt()),
            setStep(attrOldEff.getWholeDEF(), attrNewEff.getWholeDEF()),
            setStep(attrOldEff.getWholeMAG(), attrNewEff.getWholeMAG()),
            setStep(attrOldEff.getWholeAGI(), attrNewEff.getWholeAGI())
        };
        _addonAttr = new int[5] {
            attrAddon.getWholeHp(),
                attrAddon.getWholeAtt(),
                attrAddon.getWholeDEF(),
                attrAddon.getWholeMAG(),
                attrAddon.getWholeAGI()
        };
        _addonAttrLv = new int[] {
            CardManagerment.Instance.getCardAttrAppendLevel(role, AttributeType.hp),
            CardManagerment.Instance.getCardAttrAppendLevel(role, AttributeType.attack),
            CardManagerment.Instance.getCardAttrAppendLevel(role, AttributeType.defecse),
            CardManagerment.Instance.getCardAttrAppendLevel(role, AttributeType.magic),
            CardManagerment.Instance.getCardAttrAppendLevel(role, AttributeType.agile),
        };

        cardName.text = QualityManagerment.getQualityColor(role.getQualityId()) + role.getName();
        int jobId = role.getJob();

        jobSprite.spriteName = CardManagerment.Instance.qualityIconTextToBackGround(jobId) + "s";
        //属性界面“力”系背景(力系和毒系职业用)
        if (jobId == 1 || jobId == 4)
        {
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.BACKGROUNDPATH + "card_topBackGround_1", topBackGround);
        }
        //属性界面“敏”系背景(反和敏职业用)
        else if (jobId == 3 || jobId == 5)
        {
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.BACKGROUNDPATH + "card_topBackGround_2", topBackGround);
        }
        //属性界面“魔”系背景(魔和辅职业用)
        else
        {
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.BACKGROUNDPATH + "card_topBackGround_3", topBackGround);
        }
        nowLv                = oldCard.getLevel();
        levelLabel.text      = "Lv." + nowLv + "/" + role.getMaxLevel();
        evoSprite.spriteName = card.isMainCard() ? "attr_evup" : "attr_ev";
        if (EvolutionManagerment.Instance.getMaxLevel(role) == 0)
        {
            evoLabel.text = LanguageConfigManager.Instance.getLanguage("Evo10");
        }
        else
        {
            evoLabel.text = role.isMainCard()?
                            role.getSurLevel() + "/" + SurmountManagerment.Instance.getMaxSurLevel(role):
                            role.getEvoLevel() + "/" + role.getMaxEvoLevel();
        }

        combat.text = " " + CombatManager.Instance.getCardCombat(oldCard);

        for (int i = 0; i < attrLabels.Length; i++)
        {
            attrLabels [i].text = _oldAttr [i] + "";
        }

        for (int i = 0; i < addAttrLabels.Length; i++)
        {
            addAttrLabels [i].text = "";
        }

        StartCoroutine(Utils.DelayRun(() => {
            canSeeAddon = false;
            step        = 0;
            nextSetp    = 1;
            canRefresh  = true;
            MaskWindow.LockUI();
        }, 0.5f));
    }