condition handle(not finish)

This commit is contained in:
y.x 2020-12-07 13:43:03 +08:00
parent 8d013767de
commit 2633d19724
4 changed files with 11 additions and 9 deletions

View File

@ -155,7 +155,6 @@ export class BattleHandler {
}
return lst;
};
/**
* 使

View File

@ -34,12 +34,6 @@ export class Condition {
case CondType.CARD_COUNT_TOTAL:
v = tg_owner.getTotalCardCount();
return this._isok(v,this._v,this._cdt);
case CondType.CARD_ACTION_LINK:
return (tg_value == this._type);
case CondType.CARD_ACTION_LINK_OTHER:
return (tg_value == this._type);
case CondType.CARD_ACTION_LINK_SELF:
return (tg_value == this._type);
default:
break;
}
@ -59,7 +53,11 @@ export class Condition {
default:
return false;
}
}
};
public isTempTotalCard(){
return this._type == CondType.CARD_COUNT_TOTAL;
};
};
// module.exports = Condition;

View File

@ -315,6 +315,10 @@ export class Skill {
this._cb = cb;
};
isTotalCardSkill(){
return this._tgctrl._cond.isTempTotalCard();
};
clone() {
let obj = new Skill();
obj._currCount = 0; // 当前计数

View File

@ -16,7 +16,8 @@ import { Trigger } from "./Trigger";
export class TriggerCtrl{
private _id: number;
private _tg: Trigger;
private _cond: Condition;
_cond: Condition;
init(id:number, tgobj:Trigger, condobj: Condition){
this._id = id;