1
0
Fork 0

implement WX16-006 cost

This commit is contained in:
WEBXOSS 2017-08-06 17:46:59 +08:00
parent c689fba45e
commit aa91b0d950
2 changed files with 14 additions and 6 deletions

View file

@ -117259,9 +117259,12 @@ var CardInfo = {
"ターン終了時まで、あなたのシグニ1体は「バニッシュされない。」を得る。",
"あなたのトラッシュからあなたのルリグと同じ色を持つシグニを2枚まで手札に加える。",
],
// costChange: function () {
// TODO...
// },
costChange: function () {
var obj = Object.create(this);
obj.costChange = null;
obj._2286 = true;
return obj;
},
useCondition: function () {
return !this.player.lrig.hasColor('colorless');
},
@ -117293,7 +117296,7 @@ var CardInfo = {
},{
actionAsyn: function () {
var filter = function (card) {
return card.hasSameColorWith(this.player.lrig);
return card.hasSameColorWith(card.player.lrig);
};
return this.player.pickCardAsyn(filter,0,2);
},

View file

@ -479,7 +479,6 @@ Player.prototype.summonResonaAsyn = function (card) {
Player.prototype.selectSummonZoneAsyn = function (optional,rise) {
var zones = this.getSummonZones(null,rise);
if (!zones.length) {
debugger;
return Callback.immediately(null);
}
if (optional) return this.selectOptionalAsyn('SUMMON_SIGNI_ZONE',zones);
@ -1542,7 +1541,13 @@ Player.prototype.encodeCard = function (card, costObj) {
Player.prototype.encodeCost = function (cost, withoutFilter) {
// cost => [{ count: 3, mask: 0b00001, filter: () => ... }, ...]
var requirements = []
if (cost.costColorless) requirements.push({ count: cost.costRed, mask: 31 })
if (cost.costColorless) {
if (cost._2286) {
requirements.push({ count: cost.costColorless, mask: this.cardToInteger(this.lrig) })
} else {
requirements.push({ count: cost.costColorless, mask: 31 })
}
}
if (cost.costWhite) requirements.push({ count: cost.costWhite, mask: 1 })
if (cost.costBlack) requirements.push({ count: cost.costBlack, mask: 3 })
if (cost.costGreen) requirements.push({ count: cost.costGreen, mask: 4 })