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

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

View File

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

View File

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

View File

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