Playfield 类方法的注释
前言
- 本篇随笔的底包采用的是百度炉石兄弟吧20200109折腾版中自带的 routines 文件。
- 本次仅为绝大多数方法添加 xml 注释和简单解析,没有具体解析与重构。
Playfield
类方法众多,欢迎指出我的注解错误。有任何问题或建议可以在下方进行评论。
正文
1. addMinionsReal, addCardsReal
#region 初始化时使用,合并两个列表
private void addMinionsReal(List<Minion> source, List<Minion> trgt)
private void addCardsReal(List<Handmanager.Handcard> source)
#endregion
2. copyValuesFrom
方法体为空
3. isEqual
/// <summary>
/// 比较两个Playfield是否相同,用于AI计算,若不相同则会重新计算
/// </summary>
/// <param name="p">被比较的playfield</param>
/// <param name="logg">是否输出log</param>
/// <returns></returns>
public bool isEqual(Playfield p, bool logg)
建议添加新字段后,在这个方法内部的对应位置判断是否前后相同,可以及时发现模拟的错误,并进行重新计算。
卡组随机效果多导致总是需要重新计算就是这个原因。这也注定了兄弟玩不好随机效果多的卡组。
4.isEqualf
/// <summary>
/// 比较两个Playfield是否相同,用于silverfish
/// </summary>
/// <param name="p">被比较的playfield</param>
/// <returns></returns>
public bool isEqualf(Playfield p)
5.GetPHash
/// <summary>
/// 当前Playfield的唯一标识码
/// </summary>
/// <returns></returns>
public Int64 GetPHash()
6.enemyPlaysAoe, EnemyCardPlaying, EnemyPlaysACard
#region stuff for playing around enemy aoes
public void enemyPlaysAoe(int pprob, int pprob2)
public int EnemyCardPlaying(TAG_CLASS enemyHeroStrtClass, int currmana, int cardcount, int playAroundProb, int pap2)
public int EnemyPlaysACard(CardDB.cardName cardname, int currmana, int playAroundProb, int pap2)
#endregion
大概与 behabior - settings 文件有关。
对应参数: playaround
playaroundprob
playaroundprob2
7.getNextEntity
/// <summary>
/// 取下一个entity
/// </summary>
/// <remarks>随机取一个entity,防止与当前已有的entity重复。(建议打开看看这个程序员写的哈哈哈哈)</remarks>
/// <returns></returns>
public int getNextEntity()
8.getAttackTargets
/// <summary>
/// 获得可以被攻击的角色列表
/// </summary>
/// <param name="own">我方进行攻击true/敌方进行攻击false</param>
/// <param name="isLethalCheck">是否已经可以斩杀</param>
/// <returns>可以被攻击的角色列表</returns>
public List<Minion> getAttackTargets(bool own, bool isLethalCheck)
9.getBestPlace
/// <summary>
/// 获得随从最好的放置位置
/// </summary>
/// <param name="card">放置的随从卡牌</param>
/// <param name="lethal"></param>
/// <returns></returns>
public int getBestPlace(CardDB.Card card, bool lethal)
10.getBestAdapt
/// <summary>
/// 得到最合适的“进化”选择
/// </summary>
/// <param name="m">进化的随从</param>
/// <returns>1:+1/+1 | 2:angr | 3:hp | 4:taunt | 5:divine | 6:poison</returns>
public int getBestAdapt(Minion m)
11.guessEnemyHeroLethalMissing
/// <summary>
/// 计算如果我方随从都打脸,最终将会差多少伤害斩杀
/// </summary>
/// <returns>所差伤害</returns>
public int guessEnemyHeroLethalMissing()
12.guessHeroDamage
/// <summary>
/// 更新字段guessingHeroHP
/// </summary>
public void guessHeroDamage()
13.ownHeroHasDirectLethal
/// <summary>
/// 我方英雄是否已经能够被斩杀
/// </summary>
/// <returns></returns>
public bool ownHeroHasDirectLethal()
14.simulateTrapsStartEnemyTurn
/// <summary>
/// 在敌方回合开始时模拟触发我方奥秘
/// </summary>
public void simulateTrapsStartEnemyTurn()
15.simulateTrapsEndEnemyTurn
/// <summary>
/// 在敌方回合结束时进行模拟触发我方奥秘
/// </summary>
public void simulateTrapsEndEnemyTurn()
16.endTurn
/// <summary>
/// 结束回合
/// </summary>
public void endTurn()
17.startTurn
/// <summary>
/// 开始回合
/// </summary>
public void startTurn()
18.unlockMana
/// <summary>
/// 解锁过载的法力水晶
/// </summary>
public void unlockMana()
19.getHeroPowerDamage
/// <summary>
/// 计算英雄技能伤害
/// </summary>
/// <remarks>如AT_003,会使英雄技能额外造成伤害</remarks>
/// <param name="dmg">原伤害</param>
/// <returns>获得加成后的伤害</returns>
public int getHeroPowerDamage(int dmg)
20.getEnemyHeroPowerDamage
/// <summary>
/// 计算敌方英雄技能伤害
/// </summary>
/// <remarks>如AT_003,会使英雄技能额外造成伤害</remarks>
/// <param name="dmg">原伤害</param>
/// <returns>获得加成后的伤害</returns>
public int getEnemyHeroPowerDamage(int dmg)
21.getSpellDamageDamage
/// <summary>
/// 计算我方法术造成的伤害
/// </summary>
/// <remarks>如维伦、法术强度等,会使法术额外造成伤害</remarks>
/// <param name="dmg">原伤害</param>
/// <returns>获得加成后的伤害</returns>
public int getSpellDamageDamage(int dmg)
22.getSpellHeal
/// <summary>
/// 计算我方法术造成的治疗量
/// </summary>
/// <remarks>可能受到奥金尼、法强等影响</remarks>
/// <param name="heal">原治疗量</param>
/// <returns>影响后的治疗量(可能由于奥金尼导致返回一个负数)</returns>
public int getSpellHeal(int heal)
23.applySpellLifesteal
/// <summary>
/// 法术造成吸血
/// </summary>
/// <param name="heal">吸血量</param>
/// <param name="own">我方true/敌方false</param>
public void applySpellLifesteal(int heal, bool own)
24.getMinionHeal
/// <summary>
/// 计算我方随从造成的治疗量
/// </summary>
/// <remarks>受到奥金尼的影响</remarks>
/// <param name="heal">原治疗量</param>
/// <returns>影响后的治疗量(可能由于奥金尼导致返回一个负数)</returns>
public int getMinionHeal(int heal)
25.getEnemySpellDamageDamage
/// <summary>
/// 计算敌方法术造成的伤害
/// </summary>
/// <remarks>如维伦、法术强度等,会使法术额外造成伤害</remarks>
/// <param name="dmg">原伤害</param>
/// <returns>获得加成后的伤害</returns>
public int getEnemySpellDamageDamage(int dmg)
26.getEnemySpellHeal
/// <summary>
/// 计算敌方法术造成的治疗量
/// </summary>
/// <remarks>可能受到奥金尼、法强等影响</remarks>
/// <param name="heal">原治疗量</param>
/// <returns>影响后的治疗量(可能由于奥金尼导致返回一个负数)</returns>
public int getEnemySpellHeal(int heal)
27.getEnemyMinionHeal
/// <summary>
/// 计算敌方随从造成的治疗量
/// </summary>
/// <remarks>受到奥金尼的影响</remarks>
/// <param name="heal">原治疗量</param>
/// <returns>影响后的治疗量(可能由于奥金尼导致返回一个负数)</returns>
public int getEnemyMinionHeal(int heal)
28.doAction
/// <summary>
/// 执行Action
/// </summary>
/// <param name="aa">被执行的Action</param>
public void doAction(Action aa)
29.minionAttacksMinion
/// <summary>
/// 角色攻击
/// </summary>
/// <param name="attacker">攻击者</param>
/// <param name="defender">攻击目标(防御者)</param>
/// <param name="dontcount">是否不计攻击次数,如盗贼奥秘背叛、攻击同时对相邻随从造成伤害等</param>
public void minionAttacksMinion(Minion attacker, Minion defender, bool dontcount = false)
30.attackWithWeapon
/// <summary>
/// 某一方英雄用武器攻击(存疑:本回合攻击力)
/// </summary>
/// <param name="hero">攻击者</param>
/// <param name="target">攻击目标</param>
/// <param name="penality">惩罚值</param>
public void attackWithWeapon(Minion hero, Minion target, int penality)
31.playACard
/// <summary>
/// 我方打出一张卡牌
/// </summary>
/// <param name="hc">打出的卡牌</param>
/// <param name="target">目标</param>
/// <param name="position">如果为随从牌,放置的位置</param>
/// <param name="choice">抉择参数</param>
/// <param name="penality">惩罚值</param>
public void playACard(Handmanager.Handcard hc, Minion target, int position, int choice, int penality)
32.enemyplaysACard
/// <summary>
/// 敌方打出一张牌(无引用)
/// </summary>
/// <param name="c">打出的牌</param>
/// <param name="target">目标</param>
/// <param name="position"></param>
/// <param name="choice">抉择参数</param>
/// <param name="penality">惩罚值</param>
public void enemyplaysACard(CardDB.Card c, Minion target, int position, int choice, int penality)
33.playHeroPower
/// <summary>
/// 使用英雄技能
/// </summary>
/// <param name="target">目标</param>
/// <param name="penality">惩罚值</param>
/// <param name="ownturn">我方true/敌方false</param>
/// <param name="choice">抉择参数</param>
public void playHeroPower(Minion target, int penality, bool ownturn, int choice)
34.lowerWeaponDurability
/// <summary>
/// 使某一方武器失去N点耐久度
/// </summary>
/// <param name="value">失去的耐久度</param>
/// <param name="own">我方true/敌方false</param>
public void lowerWeaponDurability(int value, bool own)
35.doDmgTriggers
/// <summary>
/// 造成伤害扳机
/// </summary>
public void doDmgTriggers()
扳机效果通常由其他方法进行调用,而不会直接调用。
下面是来自灰机wiki的炉石中文维基对扳机翻译的讨论。具体释义点击查看。
「扳机」一词是从英文版进阶规则集的「trigger」一词直译而来,用于表示因某事件发生而触发的效果。在使用规则集的过程中,有很多人向我们提出这个翻译难以理解。实际上,我们使用该翻译主要有以下原因:
- 明确。英文 trigger 一词是明确的(虽然会与表示触发的动词 trigger 混淆,但是这问题不大)。扳机一词虽然稍微难以理解,但是它不会与其它的用词产生混淆。
- 简洁。使用「扳机」而非「触发器」或「触发效果」的主要原因是该词长度较短,且不具有可分解的结构。因此「治疗扳机」相比「治疗触发器」或「治疗触发效果」更加流畅且不易产生歧义。
36.triggerACharGotHealed
/// <summary>
/// 某角色获得治疗扳机
/// </summary>
public void triggerACharGotHealed()
37.triggerAMinionGotHealed
/// <summary>
/// 某随从获得治疗扳机
/// </summary>
public void triggerAMinionGotHealed()
38.triggerAMinionGotDmg
/// <summary>
/// 某随从受到伤害扳机
/// </summary>
public void triggerAMinionGotDmg()
39.triggerAMinionLosesDivineShield
/// <summary>
/// 某随从失去圣盾扳机
/// </summary>
public void triggerAMinionLosesDivineShield()
40.triggerAMinionDied
/// <summary>
/// 某随从死亡扳机
/// </summary>
public void triggerAMinionDied()
41.triggerAMinionIsGoingToAttack
/// <summary>
/// 某随从被攻击扳机
/// </summary>
/// <param name="attacker">攻击者</param>
/// <param name="target">攻击目标</param>
public void triggerAMinionIsGoingToAttack(Minion attacker, Minion target)
42.triggerAMinionDealedDmg
/// <summary>
/// 随从造成伤害扳机
/// </summary>
/// <param name="m">造成伤害的随从</param>
/// <param name="dmgDone">造成的伤害</param>
/// <param name="isAttacker"></param>
public void triggerAMinionDealedDmg(Minion m, int dmgDone, bool isAttacker)
43.triggerACardWillBePlayed
/// <summary>
/// 打出卡牌扳机
/// </summary>
/// <param name="hc">打出的卡牌</param>
/// <param name="own">我方true/敌方false</param>
public void triggerACardWillBePlayed(Handmanager.Handcard hc, bool own)
44.triggerAMinionIsSummoned
/// <summary>
/// 随从置入战场时扳机
/// </summary>
/// <param name="m">随从</param>
public void triggerAMinionIsSummoned(Minion m)
45.triggerAMinionWasSummoned
/// <summary>
/// 随从置入战场后扳机
/// </summary>
/// <param name="mnn">随从</param>
public void triggerAMinionWasSummoned(Minion mnn)
46.triggerEndTurn
/// <summary>
/// 回合结束扳机
/// </summary>
/// <param name="ownturn">我方回合true/敌方回合false</param>
public void triggerEndTurn(bool ownturn)
47.triggerStartTurn
/// <summary>
/// 回合开始扳机
/// </summary>
/// <param name="ownturn">我方回合true/敌方回合false</param>
public void triggerStartTurn(bool ownturn)
48.triggerAHeroGotArmor
/// <summary>
/// 英雄获得护甲扳机
/// </summary>
/// <param name="ownHero">我方英雄true/敌方英雄false</param>
public void triggerAHeroGotArmor(bool ownHero)
49.triggerCardsChanged
/// <summary>
/// 卡牌发生变化扳机
/// </summary>
/// <param name="own">我方true/敌方false</param>
public void triggerCardsChanged(bool own)
50.triggerInspire
/// <summary>
/// 激励扳机
/// </summary>
/// <param name="ownturn">我方true/敌方false</param>
public void triggerInspire(bool ownturn)
51.secretTrigger_CharIsAttacked
/// <summary>
/// 触发敌方奥秘——当某角色进行攻击
/// </summary>
/// <param name="attacker">攻击者</param>
/// <param name="defender">攻击目标(防御者)</param>
/// <returns></returns>
public int secretTrigger_CharIsAttacked(Minion attacker, Minion defender)
52.secretTrigger_HeroGotDmg
/// <summary>
/// 触发敌方奥秘——英雄受到伤害时
/// </summary>
/// <param name="own">受伤害的英雄归属,我方true/敌方false</param>
/// <param name="dmg">受到的伤害</param>
public void secretTrigger_HeroGotDmg(bool own, int dmg)
53.secretTrigger_MinionIsPlayed
/// <summary>
/// 触发敌方奥秘——使用一张随从牌后
/// </summary>
/// <param name="playedMinion"></param>
public void secretTrigger_MinionIsPlayed(Minion playedMinion)
54.secretTrigger_SpellIsPlayed
/// <summary>
/// 触发敌方奥秘——施放一个法术后
/// </summary>
/// <param name="target">法术目标</param>
/// <param name="c">施放的法术牌</param>
/// <returns></returns>
public int secretTrigger_SpellIsPlayed(Minion target, CardDB.Card c)
55.secretTrigger_MinionDied
/// <summary>
/// 触发敌方奥秘——当某随从死亡后
/// </summary>
/// <param name="own">死亡的随从归属,我方true/敌方false</param>
public void secretTrigger_MinionDied(bool own)
56.secretTrigger_HeroPowerUsed
/// <summary>
/// 触发敌方奥秘——在我方使用英雄技能后
/// </summary>
public void secretTrigger_HeroPowerUsed()
57.getSecretTriggersByType
/// <summary>
/// 获得某行为将可能触发敌方奥秘的个数
/// </summary>
/// <param name="type">行为类型,0-使用随从牌,1-施放法术,2-攻击英雄,3-英雄受到伤害,4-随从死亡,5-使用英雄技能</param>
/// <param name="actedMinionOwn">进行攻击的角色归属,我方true/敌方false</param>
/// <param name="actedMinionIsHero">进行攻击的角色是否为随从</param>
/// <param name="target">法术/攻击的目标</param>
/// <returns></returns>
public int getSecretTriggersByType(int type, bool actedMinionOwn, bool actedMinionIsHero, Minion target)
58.doDeathrattles
/// <summary>
/// 执行亡语效果
/// </summary>
/// <param name="deathrattleMinions">待执行亡语效果的随从列表</param>
public void doDeathrattles(List<Minion> deathrattleMinions)
59.updateBoards
/// <summary>
/// 更新面板
/// </summary>
/// <remarks>较为复杂,通常用于触发扳机后更新</remarks>
public void updateBoards()
60.minionGetOrEraseAllAreaBuffs
/// <summary>
/// 使某随从获得或失去光环buff
/// </summary>
/// <param name="m">获得或失去光环buff的随从</param>
/// <param name="get">获得true/失去false</param>
public void minionGetOrEraseAllAreaBuffs(Minion m, bool get)
61.updateAdjacentBuffs
/// <summary>
/// 更新相邻种类buff(存疑)
/// </summary>
/// <param name="own">我方true/敌方false</param>
public void updateAdjacentBuffs(bool own)
62.createNewMinion
/// <summary>
/// 创造一个新随从
/// </summary>
/// <remarks>会触发光环入场效果</remarks>
/// <param name="hc">由哪张手牌创造</param>
/// <param name="zonepos">所在位置</param>
/// <param name="own">属于我方true/敌方false</param>
/// <returns></returns>
public Minion createNewMinion(Handmanager.Handcard hc, int zonepos, bool own)
62、63、64这几个比较复杂,我还没具体看。总的来说就是从手牌打出一张随从到战场的步骤。
63.placeAmobSomewhere
/// <summary>
/// 打出一张随从牌
/// </summary>
/// <param name="hc">打出的随从牌</param>
/// <param name="choice">抉择参数,用于sim</param>
/// <param name="zonepos">放入战场中的位置</param>
public void placeAmobSomewhere(Handmanager.Handcard hc, int choice, int zonepos)
64.addMinionToBattlefield
/// <summary>
/// 将随从置入战场
/// </summary>
/// <param name="m">随从</param>
/// <param name="isSummon">无用的参数</param>
public void addMinionToBattlefield(Minion m, bool isSummon = true)
65.equipWeapon
/// <summary>
/// 为某一方英雄装备一把武器
/// </summary>
/// <param name="c">武器卡牌</param>
/// <param name="own">我方true/敌方false</param>
public void equipWeapon(CardDB.Card c, bool own)
66.callKid
/// <summary>
/// 召唤一个随从
/// </summary>
/// <param name="c">所召唤随从的Card</param>
/// <param name="zonepos">召唤随从的位置</param>
/// <param name="own">我方true,敌方true</param>
/// <param name="spawnKid">是否为不重要的衍生随从。仅在随从达到上限时用以添加惩罚。</param>
/// <param name="oneMoreIsAllowed">随从达到上限后是否仍可召唤。通常用于亡语召唤随从或先消灭再召唤。</param>
public void callKid(CardDB.Card c, int zonepos, bool own, bool spawnKid = true, bool oneMoreIsAllowed = false)
67.minionGetFrozen
/// <summary>
/// 冻结某角色(随从/英雄)
/// </summary>
/// <param name="target">被冻结的目标</param>
public void minionGetFrozen(Minion target)
68.minionGetSilenced
/// <summary>
/// 沉默某随从
/// </summary>
/// <param name="m">将被沉默的随从</param>
public void minionGetSilenced(Minion m)
69.allMinionsGetSilenced
/// <summary>
/// 沉默所有随从
/// </summary>
/// <param name="own"></param>
public void allMinionsGetSilenced(bool own)
70.drawACard
/// <summary>
/// 抽一张牌/发现一张牌
/// </summary>
/// <param name="ss">抽到卡牌的cardName</param>
/// <param name="own">我方true/敌方false</param>
/// <param name="nopen">是否不从牌库抽出,如发现一张牌、抽某张牌的复制,默认为false从牌库抽出</param>
public void drawACard(CardDB.cardName ss, bool own, bool nopen = false)
71.drawACard
/// <summary>
/// 抽一张牌/发现一张牌
/// </summary>
/// <param name="ss">抽到卡牌的cardIDEnum</param>
/// <param name="own">我方true/敌方false</param>
/// <param name="nopen">是否不从牌库抽出,如发现一张牌、抽某张牌的复制,默认为false从牌库抽出</param>
public void drawACard(CardDB.cardIDEnum ss, bool own, bool nopen = false)
72.removeCard
/// <summary>
/// 弃掉我方某张手牌
/// </summary>
/// <param name="hcc">弃掉的手牌</param>
public void removeCard(Handmanager.Handcard hcc)
73.renumHandCards
/// <summary>
/// 为Handcard的position重新编号
/// </summary>
/// 用于卡牌移除后或添加后,整理卡牌的position
/// <param name="list">某方手牌</param>
public void renumHandCards(List<Handmanager.Handcard> list)
74.attackEnemyHeroWithoutKill
/// <summary>
/// 保证不斩杀对面的情况下对敌方英雄造成伤害
/// </summary>
/// <remarks>用于敌方回合的模拟</remarks>
/// <param name="dmg">造成的伤害</param>
public void attackEnemyHeroWithoutKill(int dmg)
75.minionGetDestroyed
/// <summary>
/// 消灭某随从
/// </summary>
/// <param name="m">将被消灭的随从</param>
public void minionGetDestroyed(Minion m)
76.allMinionsGetDestroyed
/// <summary>
/// 消灭所有随从
/// </summary>
public void allMinionsGetDestroyed()
77.minionGetArmor
/// <summary>
/// 英雄获得护甲
/// </summary>
/// <param name="m">Minion类型的英雄</param>
/// <param name="armor">护甲值</param>
public void minionGetArmor(Minion m, int armor)
78.minionReturnToHand
/// <summary>
/// 将某随从移回手牌
/// </summary>
/// <param name="m">将被操作的随从</param>
/// <param name="own">移回哪一方手牌,我方true/敌方false</param>
/// <param name="manachange">法力值消耗变化</param>
public void minionReturnToHand(Minion m, bool own, int manachange)
79.minionReturnToDeck
/// <summary>
/// 将某随从洗入某一方的牌库
/// </summary>
/// <param name="m">将被操作的随从</param>
/// <param name="own">将要洗入哪一方牌库,我方true/敌方false</param>
public void minionReturnToDeck(Minion m, bool own)
80.minionTransform
/// <summary>
/// 随从变形
/// </summary>
/// <remarks>如变羊术</remarks>
/// <param name="m">要变形的随从</param>
/// <param name="c">将会变成的卡牌</param>
public void minionTransform(Minion m, CardDB.Card c)
81.getRandomCardForManaMinion
/// <summary>
/// 得到一个法力值消耗为(X)的随机随从Card
/// </summary>
/// <remarks>实际就是身材符合费用的白板</remarks>
/// <param name="manaCost">X</param>
/// <returns>随从的CardDB.Card类型</returns>
public CardDB.Card getRandomCardForManaMinion(int manaCost)
82.getEnemyCharTargetForRandomSingleDamage
/// <summary>
/// 获取随机造成X点伤害的最佳目标
/// </summary>
/// <remarks>如果自己能先于敌方斩杀对手,则选择敌方英雄,否则根据伤害数选择最消极的情况(伤害高则选择血量最低的,伤害低则选择血量最高的)</remarks>
/// <param name="damage">X点伤害</param>
/// <param name="onlyMinions">是否不包含英雄,默认false包含英雄</param>
/// <returns></returns>
public Minion getEnemyCharTargetForRandomSingleDamage(int damage, bool onlyMinions = false)
83.minionGetControlled
/// <summary>
/// 随从被某方获得控制权
/// </summary>
/// <param name="m">被操作的随从</param>
/// <param name="newOwner">新的控制者,我方true/敌方false</param>
/// <param name="canAttack">能否进行攻击</param>
/// <param name="forced"></param>
public void minionGetControlled(Minion m, bool newOwner, bool canAttack, bool forced = false)
84.Magnetic
/// <summary>
/// 使某随从磁力吸附到其他机械随从上
/// </summary>
/// <param name="mOwn">磁力随从</param>
public void Magnetic(Minion mOwn)
85.minionGetWindfurry
/// <summary>
/// 使某随从获得风怒
/// </summary>
/// <param name="m">获得风怒的随从</param>
public void minionGetWindfurry(Minion m)
86.minionGetCharge
/// <summary>
/// 使某随从获得冲锋
/// </summary>
/// <param name="m">获得冲锋的随从</param>
public void minionGetCharge(Minion m)
87.minionGetRush
/// <summary>
/// 使某随从获得突袭
/// </summary>
/// <param name="m">获得突袭的随从</param>
public void minionGetRush(Minion m)
88.minionLostCharge
/// <summary>
/// 使某随从失去冲锋
/// </summary>
/// <param name="m">失去冲锋的随从</param>
public void minionLostCharge(Minion m)
89.minionGetTempBuff
/// <summary>
/// 使某角色获得本回合buff
/// </summary>
/// <remarks>暂时只有角色获得本回合攻击力buff的引用</remarks>
/// <param name="m">获得buff的角色</param>
/// <param name="tempAttack">本回合攻击buff</param>
/// <param name="tempHp">本回合血量buff</param>
public void minionGetTempBuff(Minion m, int tempAttack, int tempHp)
90.minionGetAdjacentBuff
/// <summary>
/// 使某随从获得相邻类型buff
/// </summary>
/// <param name="m">获得buff的随从</param>
/// <param name="angr">获得攻击buff</param>
/// <param name="vert">获得血量buff</param>
public void minionGetAdjacentBuff(Minion m, int angr, int vert)
91.allMinionOfASideGetBuffed
/// <summary>
/// 使某一方所有随从获得buff
/// </summary>
/// <param name="own">我方true/敌方false</param>
/// <param name="attackbuff">攻击buff</param>
/// <param name="hpbuff">血量buff</param>
public void allMinionOfASideGetBuffed(bool own, int attackbuff, int hpbuff)
92.minionGetBuffed
/// <summary>
/// 使某随从获得buff
/// </summary>
/// <param name="m">获得buff的随从</param>
/// <param name="attackbuff">攻击buff</param>
/// <param name="hpbuff"></param>
public void minionGetBuffed(Minion m, int attackbuff, int hpbuff)
93.cthunGetBuffed
/// <summary>
/// 使你的克苏恩获得buff
/// </summary>
/// <param name="attackbuff">攻击buff</param>
/// <param name="hpbuff">血量buff</param>
/// <param name="tauntbuff">嘲讽buff</param>
public void cthunGetBuffed(int attackbuff, int hpbuff, int tauntbuff)
94.minionLosesDivineShield
/// <summary>
/// 使某随从失去圣盾
/// </summary>
/// <param name="m">失去圣盾的随从</param>
public void minionLosesDivineShield(Minion m)
95.discardCards
/// <summary>
/// 使某方弃掉N张手牌
/// </summary>
/// <param name="num">弃牌数</param>
/// <param name="own">我方true/敌方false</param>
public void discardCards(int num, bool own)
96.lethalMissing
/// <summary>
/// 距离斩杀所相差伤害数
/// </summary>
/// <returns></returns>
public int lethalMissing()
97.nextTurnWin
/// <summary>
/// 依照当前场面随从,下回是否可以斩杀
/// </summary>
/// <remarks>通常只用于回合结束之前的一个Playfield,仅在特定的场合使用</remarks>
/// <returns>下回可是否可以斩杀</returns>
public bool nextTurnWin()
98.minionSetAngrToX
/// <summary>
/// 将某随从的攻击力变为X
/// </summary>
/// <param name="m">所操作的随从</param>
/// <param name="newAngr">X</param>
public void minionSetAngrToX(Minion m, int newAngr)
99.minionSetLifetoX
/// <summary>
/// 将某随从的生命值变为X
/// </summary>
/// <remarks>如守日者塔林姆的效,,变化后无激怒状态。</remarks>
/// <param name="m">所操作的随从</param>
/// <param name="newHp">X</param>
public void minionSetLifetoX(Minion m, int newHp)
100.minionSetAngrToHP
/// <summary>
/// 使一个随从的攻击力等同于其生命值
/// </summary>
/// <remarks>目前仅用于心灵之火</remarks>
/// <param name="m">所操作的随从</param>
public void minionSetAngrToHP(Minion m)
101.minionSwapAngrAndHP
/// <summary>
/// 互换一个随从的攻击力和生命值
/// </summary>
/// <param name="m">被互换攻击力和生命值的随从</param>
public void minionSwapAngrAndHP(Minion m)
102.minionGetDamageOrHeal
/// <summary>
/// 某随从受到伤害/治疗
/// </summary>
/// <param name="m">受到伤害/治疗的随从</param>
/// <param name="dmgOrHeal">伤害量/治疗量</param>
/// <param name="dontDmgLoss">是否不计损失,默认为false即计算损失量,用于计算behavior价值使用。like killing a 2/1 with an 3/3 -> => lostdamage = 2</param>
public void minionGetDamageOrHeal(Minion m, int dmgOrHeal, bool dontDmgLoss = false)
103.allMinionOfASideGetDamage
/// <summary>
/// 某一方所有随从受到伤害/治疗
/// </summary>
/// <remarks>当damages为负数时为治疗</remarks>
/// <param name="own">我方true/敌方false</param>
/// <param name="damages">伤害量/治疗量</param>
public void allMinionOfASideGetDamage(bool own, int damages, bool frozen = false)
104.allCharsOfASideGetDamage
/// <summary>
/// 某一方所有角色受到伤害/治疗
/// </summary>
/// <remarks>当damages为负数时为治疗</remarks>
/// <param name="own">我方true/敌方false</param>
/// <param name="damages">伤害量/治疗量</param>
public void allCharsOfASideGetDamage(bool own, int damages)
105.allCharsOfASideGetRandomDamage
/// <summary>
/// 某一方所有角色受到随机分配的N点伤害
/// </summary>
/// <param name="ownSide">受到伤害的一方</param>
/// <param name="times">伤害量</param>
public void allCharsOfASideGetRandomDamage(bool ownSide, int times)
106.allCharsGetDamage
/// <summary>
/// 所有角色受到伤害/治疗
/// </summary>
/// <remarks>当damages为负数时为治疗</remarks>
/// <param name="damages">伤害量/治疗量</param>
/// <param name="exceptID">不受伤害/治疗随从的entity,通常用于“对其他角色造成伤害”</param>
public void allCharsGetDamage(int damages, int exceptID = -1)
107.allMinionsGetDamage
/// <summary>
/// 所有随从受到伤害/治疗
/// </summary>
/// <remarks>当damages为负数时为治疗</remarks>
/// <param name="damages">伤害量/治疗量</param>
/// <param name="exceptID">不受伤害/治疗随从的entity,通常用于“对其他随从造成伤害”</param>
public void allMinionsGetDamage(int damages, int exceptID = -1)
108.setNewHeroPower
/// <summary>
/// 设定新的英雄技能
/// </summary>
/// <param name="newHeroPower">新的英雄技能的cardIDenum</param>
/// <param name="own">我方true/敌方false</param>
public void setNewHeroPower(CardDB.cardIDEnum newHeroPower, bool own)
109.getHandcardsByType
/// <summary>
/// 为符合条件的卡牌做标记
/// </summary>
/// <remarks>将符合条件的Handmanager.Handcard的extraParam3置为true,暂时仅供Playfield.searchRandomMinionInHand方法使用</remarks>
/// <param name="cards">标记范围</param>
/// <param name="tag">GAME_TAGs条件,如法术、武器或随从等</param>
/// <param name="race">种族条件,当GAME_TAGs为CARDRACE时进行限定,如野兽、海盗等</param>
private void getHandcardsByType(List<Handmanager.Handcard> cards, GAME_TAGs tag, TAG_RACE race = TAG_RACE.INVALID)
110.searchRandomMinionInHand
/// <summary>
/// 在给定手牌范围内寻找一个随机随从
/// </summary>
/// <param name="cards">寻找范围</param>
/// <param name="mode">寻找模式</param>
/// <param name="tag">GAME_TAGs条件,如法术、武器或随从等</param>
/// <param name="race">种族条件,当GAME_TAGs为CARDRACE时进行限定,如野兽、海盗等</param>
/// <returns></returns>
public Handmanager.Handcard searchRandomMinionInHand(List<Handmanager.Handcard> cards, searchmode mode, GAME_TAGs tag = GAME_TAGs.None, TAG_RACE race = TAG_RACE.INVALID)
111.searchRandomMinion
/// <summary>
/// 在给定随从范围内寻找一个随机随从
/// </summary>
/// <param name="minions">寻找范围</param>
/// <param name="mode">寻找模式</param>
/// <returns>所找到的最后一个随从</returns>
public Minion searchRandomMinion(List<Minion> minions, searchmode mode)
112.searchRandomMinionByMaxHP
/// <summary>
/// 在给定随从范围内寻找一个随机随从(血量小于等于MaxHP)
/// </summary>
/// <param name="minions">寻找范围</param>
/// <param name="mode">寻找模式</param>
/// <param name="maxHP">限定随从的最大血量</param>
/// <returns>所找到的最后一个随从</returns>
public Minion searchRandomMinionByMaxHP(List<Minion> minions, searchmode mode, int maxHP)
113.getNextJadeGolem
/// <summary>
/// 获得下一张CardDB.Card类型的青玉魔像
/// </summary>
/// <param name="own">我方true/敌方false</param>
/// <returns>下一张CardDB.Card类型的青玉魔像</returns>
public CardDB.Card getNextJadeGolem(bool own)
114.debugMinions, printBoard, printBoardString, printBoardDebug, printActions, printActionforDummies
用于输出日志以及调试
Playfield 类方法的注释的更多相关文章
- PHP 通过 ReflectionMethod 反射类方法获取注释返回 false 的问题解决
php 通过反射 ReflectionMethod 类来获取类方法的相关信息,其中就包含方法的注释内容. 问题描述 在公司测试环境运行以下代码,如果是 cli 命令行模式运行,正常输出代码注释.如果是 ...
- 点评阿里JAVA手册之编程规约(命名风格、常量定义、代码风格、控制语句、注释规约)
下载原版阿里JAVA开发手册 [阿里巴巴Java开发手册v1.2.0] 本文主要是对照阿里开发手册,注释自己在工作中运用情况. 本文难度系数为一星(★) 码出高效.码出质量. 代码的字里行间流淌的是 ...
- IntelliJ IDEA 注释模板设置
1.idea类注释 打开:file->setting->Editor->Filr and Code Templates->Includes->File Header 类注 ...
- idea如何设置类头注释和方法注释(带注释模板)
1.idea类注释 打开:file->setting->Editor->Filr and Code Templates->Includes->File Header 类注 ...
- 阿里巴巴 Java 开发手册 (八) 注释规约
1. [强制]类.类属性.类方法的注释必须使用 Javadoc 规范,使用/**内容*/格式,不得使用 //xxx 方式. 说明:在 IDE 编辑窗口中,Javadoc 方式会提示相关注释,生成 Ja ...
- java基础之 java注释
JAVA里有2中注释风格. 一种以 "/*" 开始以 "*/" 结尾,另一种是以 "//" 起头的. 被注释的内容不会被java虚拟机编译, ...
- Annotation深入研究——@Documented注释使用
Documented注释的作用及其javadoc文档生成工具的使用 代码放在MyDocumentedtAnnotationDemo.java文件中 package org.yu.demo16.docu ...
- php 魔鬼训练
环境配置 找到自己的[系统命令行]目录:bin /usr/bin #mac系统 /bin #ubuntu系统 再找到Php的编译器,这个根据你的安装路径来判断,mac默认的路径如下 cd /usr/b ...
- 为什么阿里的程序员那么帅?---原来他们都有"编码规约扫描"神器在手
为了迎接十九大的到来,帝都城这几天也是满城风雨,听说早高峰期地铁站的人都排到天桥上了,哎,这就是该死的北漂生活.但是无论怎样,我依然在北京向各位问好! 之前总结过俩篇关于阿里Java开发手册的编程规约 ...
随机推荐
- 3个月零基础入门Python+数据分析,详细时间表+计划表分享
大家好,我是白云. 今天想给大家分享的是三个月零基础入门数据分析学习计划.有小伙伴可能会说,英语好像有点不太好,要怎么办?所以今天我给大家分享的资源呢就是对国内的小伙伴很友好,还附赠大家一份三个月学 ...
- Burp - Turbo Intruder
Turbo Intruder 基础使用总结,把Python代码都记录下,要是有啥骚姿势,求各位师傅交流. 个人感觉超强的一款Burp插件,反正超快 Link: https://github.com/P ...
- 2020Android高级开发面试题以及答案整理,持续更新中~
本篇收录了一些大厂面试中经常会遇到的经典面试题,并且我做好了整理分类.虽然今年的金九银十已经过去了,但是可以为明年的金三银四做准备啊,相信每一个跳槽季都有很多的前端开发者蠢蠢欲动,通过对本篇知识的整理 ...
- View epub and mobi File on Linux
Calibre has stand-alone ebook viewer "ebook-viewer", start it in terminal: $ ebook-viewer ...
- 带你认识5G技术
一.移动通讯的发展历程 1.1.移动通讯具有代际演进规律 "G"代表一代 每10年一个周期,如下图所示: 1.2.5G技术指标对比概述 主要的技术指标有:流量密度.连接数密度.时延 ...
- 安鸾CTF Writeup SSRF02
SSRF02 题目链接:http://www.whalwl.host:8090/ 看到题目,以为是SSRF 获取内网信息, SFTP FTP Dict gopher TFTP file ldap 协议 ...
- Blind SQL injection:盲注详解
什么是盲注? 当应用程序易受SQL注入攻击,但其HTTP响应不包含相关SQL查询的结果或任何数据库错误的详细信息时,就会出现盲SQL注入. 对于盲目SQL注入漏洞,许多技术(如联合攻击)都是无效的,因 ...
- CVPR2021 | 重新思考BatchNorm中的Batch
前言 公众号在前面发过三篇分别对BatchNorm解读.分析和总结的文章(文章链接在文末),阅读过这三篇文章的读者对BatchNorm和归一化方法应该已经有了较深的认识和理解.在本文将介绍一篇关于 ...
- FTP三种访问模式
FTP匿名访问模式是比较不安全的服务模式,尤其在真实的工作环境中千万不要存放敏感的数据,以免泄露. vsftpd程序默认已经允许匿名访问模式,我们要做的就是开启匿名用户的上传和写入权限,写入下面的参数 ...
- 005 媒体访问控制(MAC,Media Access Control)
一,MAC MAC是媒体访问控制器.以太网MAC由IEEE-802.3以太网标准定义.它实现了数据链路层.最新的MAC同时支持10/100/1000Mbps速率.通常情况下,它实现MII/GMII/R ...