public void CheckTurnBonux() { foreach (CardInfo info in cards) { if (info.ca.HasTurnEffect) { foreach (CardTurnEffect effect in info.ca.TurnEffects) { switch (effect.type) { case eCardTurnEffectType.Jiyi: pRoleMdl.AddJishu(effect.value); break; case eCardTurnEffectType.Meili: pRoleMdl.AddWaiguan(effect.value); break; case eCardTurnEffectType.Fanying: pRoleMdl.AddCaiyi(effect.value); break; case eCardTurnEffectType.Tili: pRoleMdl.AddKangya(effect.value); break; case eCardTurnEffectType.Koucai: pRoleMdl.AddKoucai(effect.value); break; case eCardTurnEffectType.Shuxing: pRoleMdl.AddJishu(effect.value); pRoleMdl.AddWaiguan(effect.value); pRoleMdl.AddCaiyi(effect.value); pRoleMdl.AddKangya(effect.value); pRoleMdl.AddKoucai(effect.value); break; case eCardTurnEffectType.Fensi: pRoleMdl.AddFensi(0, (int)effect.value); break; case eCardTurnEffectType.Xingdongdian: pRoleMdl.AddActionPoints((int)effect.value); break; default: break; } } } } }
public void handleReviewEffect(int idx) { int value = curWeibo.reviews[idx].value; switch (curWeibo.reviews[idx].effect) { case WeiboReviewEffect.AddCaiyi: pRoleMgr.AddCaiyi(value); mUIMgr.ShowHint("才艺 + " + value); break; case WeiboReviewEffect.AddJishu: pRoleMgr.AddJishu(value); mUIMgr.ShowHint("技术 + " + value); break; case WeiboReviewEffect.AddKangya: pRoleMgr.AddKangya(value); mUIMgr.ShowHint("抗压 + " + value); break; case WeiboReviewEffect.AddWaiguan: pRoleMgr.AddWaiguan(value); mUIMgr.ShowHint("外观 + " + value); break; case WeiboReviewEffect.AddKoucai: pRoleMgr.AddKoucai(value); mUIMgr.ShowHint("口才 + " + value); Debug.Log("ADDKOUCAI"); break; case WeiboReviewEffect.AddAllState: pRoleMgr.AddKoucai(value); pRoleMgr.AddWaiguan(value); pRoleMgr.AddKangya(value); pRoleMgr.AddJishu(value); pRoleMgr.AddCaiyi(value); mUIMgr.ShowHint("所有属性 + " + value); break; case WeiboReviewEffect.AddFensi: //TODO Addfensi //pRoleMgr.AddFensi(value); break; case WeiboReviewEffect.none: break; } pMainUI.UpdateWords(); }
public string GainShuxing(int wantBuyIdx) { int val = productList[wantBuyIdx].ShuxingValue; string shuxingInfo = ""; switch (productList[wantBuyIdx].ShuxingRelate) { case "jishu": pRoleMdl.AddJishu(val); shuxingInfo += "技术"; break; case "koucai": pRoleMdl.AddKoucai(val); shuxingInfo += "口才"; break; case "waiguan": pRoleMdl.AddWaiguan(val); shuxingInfo += "魅力"; break; case "kangya": pRoleMdl.AddKangya(val); shuxingInfo += "抗压"; break; case "caiyi": pRoleMdl.AddCaiyi(val); shuxingInfo += "才艺"; break; default: break; } if (shuxingInfo != "") { shuxingInfo += " + " + val.ToString(); } return(shuxingInfo); }
public bool learnSkill(string skillId) { SkillInfo2 skill = GetSkillAsset(skillId); if (skill == null) { return(false); } if (skill.isLearned) { mUIMgr.ShowHint("这个技能已经学会了"); return(false); } if (!checkSkillRequirement(skill)) { return(false); } if (!checkBranch(skill.Branch, skill.Level)) { mUIMgr.ShowHint("你需要先学习前一个技能"); return(false); } skill.isLearned = true; branchLevel[skill.Branch]++; // calculate requirement mRoleMdl.AddSkillPoint(-skill.Requirements.reqSkillPointValue); // gainRewards for (int i = 0; i < skill.Rewards.bonus.Count; i++) { switch (skill.Rewards.bonus[i]) { case SkillBonusType.addKoucai: mRoleMdl.AddKoucai(skill.Rewards.rewValue[i]); mUIMgr.ShowHint("口才 + " + skill.Rewards.rewValue[i]); break; case SkillBonusType.addCaiyi: mRoleMdl.AddCaiyi(skill.Rewards.rewValue[i]); mUIMgr.ShowHint("才艺 + " + skill.Rewards.rewValue[i]); break; case SkillBonusType.addJishu: mRoleMdl.AddJishu(skill.Rewards.rewValue[i]); mUIMgr.ShowHint("技术 + " + skill.Rewards.rewValue[i]); break; case SkillBonusType.addKangya: mRoleMdl.AddKangya(skill.Rewards.rewValue[i]); mUIMgr.ShowHint("抗压 + " + skill.Rewards.rewValue[i]); break; case SkillBonusType.addWaiguan: mRoleMdl.AddWaiguan(skill.Rewards.rewValue[i]); mUIMgr.ShowHint("外观 + " + skill.Rewards.rewValue[i]); break; case SkillBonusType.addPower: //加能量 break; case SkillBonusType.addMoney: mUIMgr.ShowHint("金钱 + " + skill.Rewards.rewValue[i]); break; case SkillBonusType.addFensi: mUIMgr.ShowHint("粉丝 + " + skill.Rewards.rewValue[i]); break; } } LearnedSkill.Add(skillId); return(true); }