This commit is contained in:
libccy 2016-08-14 01:24:05 +08:00
parent 2111a3f506
commit f0c5a5ae9a
2 changed files with 78 additions and 69 deletions

View File

@ -3529,7 +3529,7 @@
} }
if(_status.waitingForDB){ if(_status.waitingForDB){
ui.create.arena(); ui.create.arena();
game.createEvent('game',false).content=lib.init.start; game.createEvent('game',false).setContent(lib.init.start);
delete lib.init.start; delete lib.init.start;
delete _status.waitingForDB; delete _status.waitingForDB;
game.loop(); game.loop();
@ -4153,7 +4153,7 @@
} }
else{ else{
ui.create.arena(); ui.create.arena();
game.createEvent('game',false).content=lib.init.start; game.createEvent('game',false).setContent(lib.init.start);
delete lib.init.start; delete lib.init.start;
delete _status.dbLoaded; delete _status.dbLoaded;
game.loop(); game.loop();
@ -5027,7 +5027,7 @@
next.player=player; next.player=player;
next._trigger=trigger; next._trigger=trigger;
next.triggername=event.triggername; next.triggername=event.triggername;
next.content=info.content; next.setContent(info.content);
next.skillHidden=event.skillHidden; next.skillHidden=event.skillHidden;
if(info.popup!=false&&!info.direct){ if(info.popup!=false&&!info.direct){
if(info.popup){ if(info.popup){
@ -5330,14 +5330,14 @@
if(event.cancelled&&!event.direct){ if(event.cancelled&&!event.direct){
if(lib.card[name].cancel){ if(lib.card[name].cancel){
var next=game.createEvent(name+'Cancelled'); var next=game.createEvent(name+'Cancelled');
next.content=lib.card[name].cancel; next.setContent(lib.card[name].cancel);
next.card=event.card; next.card=event.card;
next.player=player; next.player=player;
} }
} }
else{ else{
var next=game.createEvent(name); var next=game.createEvent(name);
next.content=lib.card[name].effect; next.setContent(lib.card[name].effect);
next._result=result; next._result=result;
next.card=event.card; next.card=event.card;
next.player=player; next.player=player;
@ -5804,7 +5804,7 @@
next.target=event.current; next.target=event.current;
next.card1=event.card1; next.card1=event.card1;
next.card2=event.card2; next.card2=event.card2;
next.content=event.callback; next.setContent(event.callback);
} }
"step 5" "step 5"
game.broadcastAll(ui.clear); game.broadcastAll(ui.clear);
@ -6877,7 +6877,7 @@
"step 1" "step 1"
if(get.info(card).contentBefore){ if(get.info(card).contentBefore){
var next=game.createEvent(card.name+'ContentBefore'); var next=game.createEvent(card.name+'ContentBefore');
next.content=get.info(card).contentBefore; next.setContent(get.info(card).contentBefore);
next.targets=targets; next.targets=targets;
next.card=card; next.card=card;
next.cards=cards; next.cards=cards;
@ -6890,7 +6890,7 @@
var info=get.info(card); var info=get.info(card);
if(targets.length==0&&!info.notarget) return; if(targets.length==0&&!info.notarget) return;
var next=game.createEvent(card.name); var next=game.createEvent(card.name);
next.content=info.content; next.setContent(info.content);
next.targets=targets; next.targets=targets;
next.card=card; next.card=card;
next.cards=cards; next.cards=cards;
@ -6952,7 +6952,7 @@
"step 4" "step 4"
if(get.info(card).contentAfter){ if(get.info(card).contentAfter){
var next=game.createEvent(card.name+'contentAfter'); var next=game.createEvent(card.name+'contentAfter');
next.content=get.info(card).contentAfter; next.setContent(get.info(card).contentAfter);
next.targets=targets; next.targets=targets;
next.card=card; next.card=card;
next.cards=cards; next.cards=cards;
@ -7099,7 +7099,7 @@
return; return;
} }
var next=game.createEvent(event.skill); var next=game.createEvent(event.skill);
next.content=info.content; next.setContent(info.content);
next.targets=targets; next.targets=targets;
next.cards=cards; next.cards=cards;
next.player=player; next.player=player;
@ -7506,7 +7506,7 @@
player.popup(cards[num].name); player.popup(cards[num].name);
var next=game.createEvent('lose_'+cards[num].name); var next=game.createEvent('lose_'+cards[num].name);
var info=get.info(cards[num]); var info=get.info(cards[num]);
next.content=info.onLose; next.setContent(info.onLose);
next.player=player; next.player=player;
next.card=cards[num]; next.card=cards[num];
game.delayx(); game.delayx();
@ -7865,7 +7865,7 @@
var info=get.info(card); var info=get.info(card);
if(info.onEquip&&(!info.filterEquip||info.filterEquip(card,player))){ if(info.onEquip&&(!info.filterEquip||info.filterEquip(card,player))){
var next=game.createEvent('equip_'+card.name); var next=game.createEvent('equip_'+card.name);
next.content=info.onEquip; next.setContent(info.onEquip);
next.player=player; next.player=player;
next.card=card; next.card=card;
game.delayx(); game.delayx();
@ -8902,28 +8902,28 @@
phase:function(){ phase:function(){
var next=game.createEvent('phase'); var next=game.createEvent('phase');
next.player=this; next.player=this;
next.content=lib.element.content.phase; next.setContent('phase');
}, },
phaseJudge:function(){ phaseJudge:function(){
var next=game.createEvent('phaseJudge'); var next=game.createEvent('phaseJudge');
next.player=this; next.player=this;
next.content=lib.element.content.phaseJudge; next.setContent('phaseJudge');
}, },
phaseDraw:function(){ phaseDraw:function(){
var next=game.createEvent('phaseDraw'); var next=game.createEvent('phaseDraw');
next.player=this; next.player=this;
next.num=2; next.num=2;
next.content=lib.element.content.phaseDraw; next.setContent('phaseDraw');
}, },
phaseUse:function(){ phaseUse:function(){
var next=game.createEvent('phaseUse'); var next=game.createEvent('phaseUse');
next.player=this; next.player=this;
next.content=lib.element.content.phaseUse; next.setContent('phaseUse');
}, },
phaseDiscard:function(){ phaseDiscard:function(){
var next=game.createEvent('phaseDiscard'); var next=game.createEvent('phaseDiscard');
next.player=this; next.player=this;
next.content=lib.element.content.phaseDiscard; next.setContent('phaseDiscard');
}, },
chooseToUse:function(use){ chooseToUse:function(use){
var next=game.createEvent('chooseToUse'); var next=game.createEvent('chooseToUse');
@ -8972,7 +8972,7 @@
} }
if(next.ai1==undefined) next.ai1=ai.get.order; if(next.ai1==undefined) next.ai1=ai.get.order;
if(next.ai2==undefined) next.ai2=ai.get.effect; if(next.ai2==undefined) next.ai2=ai.get.effect;
next.content=lib.element.content.chooseToUse; next.setContent('chooseToUse');
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
}, },
@ -9032,7 +9032,7 @@
next.dialog=str; next.dialog=str;
} }
} }
next.content=lib.element.content.chooseToRespond; next.setContent('chooseToRespond');
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
}, },
@ -9081,7 +9081,7 @@
if(typeof this.selectCard=='function') return false; if(typeof this.selectCard=='function') return false;
return get.select(this.selectCard)[0]>=this.player.num(this.position||'h'); return get.select(this.selectCard)[0]>=this.player.num(this.position||'h');
} }
next.content=lib.element.content.chooseToDiscard; next.setContent('chooseToDiscard');
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
}, },
@ -9101,7 +9101,7 @@
} }
return get.number(card)-ai.get.value(card)/2+addi; return get.number(card)-ai.get.value(card)/2+addi;
} }
next.content=lib.element.content.chooseToCompareMultiple; next.setContent('chooseToCompareMultiple');
} }
else{ else{
next.target=target; next.target=target;
@ -9125,7 +9125,7 @@
return get.number(card)-ai.get.value(card)/2+addi; return get.number(card)-ai.get.value(card)/2+addi;
} }
} }
next.content=lib.element.content.chooseToCompare; next.setContent('chooseToCompare');
} }
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
@ -9171,14 +9171,14 @@
if(next.filterButton==undefined) next.filterButton=lib.filter.filterButton; if(next.filterButton==undefined) next.filterButton=lib.filter.filterButton;
if(next.selectButton==undefined) next.selectButton=[1,1]; if(next.selectButton==undefined) next.selectButton=[1,1];
if(next.ai==undefined) next.ai=function(){return 1}; if(next.ai==undefined) next.ai=function(){return 1};
next.content=lib.element.content.chooseButton; next.setContent('chooseButton');
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
}, },
chooseButtonOL:function(list,callback,ai){ chooseButtonOL:function(list,callback,ai){
var next=game.createEvent('chooseButtonOL'); var next=game.createEvent('chooseButtonOL');
next.list=list; next.list=list;
next.content=lib.element.content.chooseButtonOL; next.setContent('chooseButtonOL');
next.ai=ai; next.ai=ai;
next.callback=callback; next.callback=callback;
next._args=Array.from(arguments); next._args=Array.from(arguments);
@ -9195,7 +9195,7 @@
next._args.push(arguments[i]); next._args.push(arguments[i]);
} }
} }
next.content=lib.element.content.chooseCardOL; next.setContent('chooseCardOL');
next._args.add('glow_result'); next._args.add('glow_result');
return next; return next;
}, },
@ -9232,7 +9232,7 @@
if(next.filterCard==undefined) next.filterCard=lib.filter.all; if(next.filterCard==undefined) next.filterCard=lib.filter.all;
if(next.selectCard==undefined) next.selectCard=[1,1]; if(next.selectCard==undefined) next.selectCard=[1,1];
if(next.ai==undefined) next.ai=ai.get.unuseful3; if(next.ai==undefined) next.ai=ai.get.unuseful3;
next.content=lib.element.content.chooseCard; next.setContent('chooseCard');
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
}, },
@ -9264,7 +9264,7 @@
if(next.filterTarget==undefined) next.filterTarget=lib.filter.all; if(next.filterTarget==undefined) next.filterTarget=lib.filter.all;
if(next.selectTarget==undefined) next.selectTarget=[1,1]; if(next.selectTarget==undefined) next.selectTarget=[1,1];
if(next.ai==undefined) next.ai=ai.get.attitude2; if(next.ai==undefined) next.ai=ai.get.attitude2;
next.content=lib.element.content.chooseTarget; next.setContent('chooseTarget');
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
}, },
@ -9296,7 +9296,7 @@
} }
if(next.ai1==undefined) next.ai1=ai.get.unuseful2; if(next.ai1==undefined) next.ai1=ai.get.unuseful2;
if(next.ai2==undefined) next.ai2=ai.get.attitude2; if(next.ai2==undefined) next.ai2=ai.get.attitude2;
next.content=lib.element.content.chooseCardTarget; next.setContent('chooseCardTarget');
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
}, },
@ -9322,7 +9322,7 @@
} }
next.player=this; next.player=this;
if(next.choice==undefined) next.choice=0; if(next.choice==undefined) next.choice=0;
next.content=lib.element.content.chooseControl; next.setContent('chooseControl');
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
}, },
@ -9344,7 +9344,7 @@
if(next.choice==undefined) next.choice=true; if(next.choice==undefined) next.choice=true;
} }
next.player=this; next.player=this;
next.content=lib.element.content.chooseBool; next.setContent('chooseBool');
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
}, },
@ -9389,7 +9389,7 @@
if(ai.get.attitude(_status.event.player,get.owner(button.link))>0) return -val; if(ai.get.attitude(_status.event.player,get.owner(button.link))>0) return -val;
return val; return val;
}; };
next.content=lib.element.content.choosePlayerCard; next.setContent('choosePlayerCard');
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
}, },
@ -9434,7 +9434,7 @@
if(ai.get.attitude(_status.event.player,get.owner(button.link))>0) return -val; if(ai.get.attitude(_status.event.player,get.owner(button.link))>0) return -val;
return val; return val;
}; };
next.content=lib.element.content.discardPlayerCard; next.setContent('discardPlayerCard');
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
}, },
@ -9479,14 +9479,14 @@
if(ai.get.attitude(_status.event.player,get.owner(button.link))>0) return -val; if(ai.get.attitude(_status.event.player,get.owner(button.link))>0) return -val;
return val; return val;
}; };
next.content=lib.element.content.gainPlayerCard; next.setContent('gainPlayerCard');
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
}, },
showHandcards:function(){ showHandcards:function(){
var next=game.createEvent('showHandcards'); var next=game.createEvent('showHandcards');
next.player=this; next.player=this;
next.content=lib.element.content.showHandcards; next.setContent('showHandcards');
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
}, },
@ -9502,7 +9502,7 @@
if(get.itemtype(cards)=='card') next.cards=[cards]; if(get.itemtype(cards)=='card') next.cards=[cards];
else if(get.itemtype(cards)=='cards') next.cards=cards; else if(get.itemtype(cards)=='cards') next.cards=cards;
else _status.event.next.remove(next); else _status.event.next.remove(next);
next.content=lib.element.content.showCards; next.setContent('showCards');
next._args=Array.from(arguments); next._args=Array.from(arguments);
}, },
viewCards:function(str,cards){ viewCards:function(str,cards){
@ -9510,7 +9510,7 @@
next.player=this; next.player=this;
next.str=str; next.str=str;
next.cards=cards; next.cards=cards;
next.content=lib.element.content.viewCards; next.setContent('viewCards');
next._args=Array.from(arguments); next._args=Array.from(arguments);
return next; return next;
}, },
@ -9605,7 +9605,7 @@
this.logAi(next.targets,next.card); this.logAi(next.targets,next.card);
} }
} }
next.content=lib.element.content.useCard; next.setContent('useCard');
return next; return next;
}, },
useSkill:function(){ useSkill:function(){
@ -9649,7 +9649,8 @@
else{ else{
next.targets=[]; next.targets=[];
} }
next.content=lib.element.content.useSkill; next.setContent('useSkill');
return next;
}, },
draw:function(){ draw:function(){
var next=game.createEvent('draw'); var next=game.createEvent('draw');
@ -9670,7 +9671,7 @@
} }
if(next.num==undefined) next.num=1; if(next.num==undefined) next.num=1;
if(next.num<=0) _status.event.next.remove(next); if(next.num<=0) _status.event.next.remove(next);
next.content=lib.element.content.draw; next.setContent('draw');
if(lib.config.mode=='stone'&&_status.mode=='deck'&& if(lib.config.mode=='stone'&&_status.mode=='deck'&&
next.drawDeck==undefined&&!next.player.isMin()&&next.num>1){ next.drawDeck==undefined&&!next.player.isMin()&&next.num>1){
next.drawDeck=1; next.drawDeck=1;
@ -9696,7 +9697,7 @@
} }
} }
if(next.cards==undefined) _status.event.next.remove(next); if(next.cards==undefined) _status.event.next.remove(next);
next.content=lib.element.content.discard; next.setContent('discard');
return next; return next;
}, },
respond:function(){ respond:function(){
@ -9732,7 +9733,7 @@
next.card=next.cards[0]; next.card=next.cards[0];
} }
} }
next.content=lib.element.content.respond; next.setContent('respond');
}, },
directgain:function(cards){ directgain:function(cards){
var hs=this.get('h'); var hs=this.get('h');
@ -9781,7 +9782,7 @@
next.animate=arguments[i]; next.animate=arguments[i];
} }
} }
next.content=lib.element.content.gain; next.setContent('gain');
return next; return next;
}, },
lose:function(){ lose:function(){
@ -9803,7 +9804,7 @@
} }
if(next.cards==undefined) _status.event.next.remove(next); if(next.cards==undefined) _status.event.next.remove(next);
if(next.position==undefined) next.position=ui.discardPile; if(next.position==undefined) next.position=ui.discardPile;
next.content=lib.element.content.lose; next.setContent('lose');
return next; return next;
}, },
damage:function(){ damage:function(){
@ -9842,7 +9843,7 @@
if(next.source==undefined&&!nosource) next.source=event.player; if(next.source==undefined&&!nosource) next.source=event.player;
if(next.num==undefined) next.num=1; if(next.num==undefined) next.num=1;
if(next.nature=='poison') delete next._triggered; if(next.nature=='poison') delete next._triggered;
next.content=lib.element.content.damage; next.setContent('damage');
return next; return next;
}, },
recover:function(){ recover:function(){
@ -9878,13 +9879,13 @@
if(next.source==undefined&&!nosource) next.source=event.player; if(next.source==undefined&&!nosource) next.source=event.player;
if(next.num==undefined) next.num=1; if(next.num==undefined) next.num=1;
if(next.num<=0) _status.event.next.remove(next); if(next.num<=0) _status.event.next.remove(next);
next.content=lib.element.content.recover; next.setContent('recover');
return next; return next;
}, },
doubleDraw:function(){ doubleDraw:function(){
var next=game.createEvent('doubleDraw'); var next=game.createEvent('doubleDraw');
next.player=this; next.player=this;
next.content=lib.element.content.doubleDraw; next.setContent('doubleDraw');
return next; return next;
}, },
loseHp:function(num){ loseHp:function(num){
@ -9892,7 +9893,8 @@
next.num=num; next.num=num;
next.player=this; next.player=this;
if(next.num==undefined) next.num=1; if(next.num==undefined) next.num=1;
next.content=lib.element.content.loseHp; next.setContent('loseHp');
return next;
}, },
loseMaxHp:function(){ loseMaxHp:function(){
var next=game.createEvent('loseMaxHp'); var next=game.createEvent('loseMaxHp');
@ -9906,7 +9908,8 @@
next.forced=arguments[i]; next.forced=arguments[i];
} }
} }
next.content=lib.element.content.loseMaxHp; next.setContent('loseMaxHp');
return next;
}, },
gainMaxHp:function(){ gainMaxHp:function(){
var next=game.createEvent('gainMaxHp'); var next=game.createEvent('gainMaxHp');
@ -9920,28 +9923,31 @@
next.forced=arguments[i]; next.forced=arguments[i];
} }
} }
next.content=lib.element.content.gainMaxHp; next.setContent('gainMaxHp');
return next;
}, },
changeHp:function(num,popup){ changeHp:function(num,popup){
var next=game.createEvent('changeHp',false); var next=game.createEvent('changeHp',false);
next.num=num; next.num=num;
if(popup!=undefined) next.popup=popup; if(popup!=undefined) next.popup=popup;
next.player=this; next.player=this;
next.content=lib.element.content.changeHp; next.setContent('changeHp');
return next;
}, },
dying:function(reason){ dying:function(reason){
var next=game.createEvent('dying'); var next=game.createEvent('dying');
next.player=this; next.player=this;
next.reason=reason; next.reason=reason;
next.source=reason.source; next.source=reason.source;
next.content=lib.element.content.dying; next.setContent('dying');
return next;
}, },
die:function(reason){ die:function(reason){
var next=game.createEvent('die'); var next=game.createEvent('die');
next.player=this; next.player=this;
next.reason=reason; next.reason=reason;
if(reason) next.source=reason.source; if(reason) next.source=reason.source;
next.content=lib.element.content.die; next.setContent('die');
return next; return next;
}, },
revive:function(hp){ revive:function(hp){
@ -10019,7 +10025,7 @@
var next=game.createEvent('equip'); var next=game.createEvent('equip');
next.card=card; next.card=card;
next.player=this; next.player=this;
next.content=lib.element.content.equip; next.setContent(lib.element.content.equip);
}, },
addJudge:function(card,cards){ addJudge:function(card,cards){
var next=game.createEvent('addJudge'); var next=game.createEvent('addJudge');
@ -10028,7 +10034,8 @@
if(next.cards==undefined) next.cards=[card]; if(next.cards==undefined) next.cards=[card];
if(get.itemtype(next.cards)=='card') next.cards=[next.cards]; if(get.itemtype(next.cards)=='card') next.cards=[next.cards];
next.player=this; next.player=this;
next.content=lib.element.content.addJudge; next.setContent('addJudge');
return next;
}, },
judge:function(){ judge:function(){
var next=game.createEvent('judge'); var next=game.createEvent('judge');
@ -10061,13 +10068,14 @@
else if(next.skill) str=get.translation(next.skill); else if(next.skill) str=get.translation(next.skill);
else str=get.translation(_status.event.name); else str=get.translation(_status.event.name);
next.judgestr=str; next.judgestr=str;
next.content=lib.element.content.judge; next.setContent('judge');
return next; return next;
}, },
turnOver:function(){ turnOver:function(){
var next=game.createEvent('turnOver'); var next=game.createEvent('turnOver');
next.player=this; next.player=this;
next.content=lib.element.content.turnOver; next.setContent('turnOver');
return next;
}, },
out:function(bool){ out:function(bool){
if(this.lockOut) return; if(this.lockOut) return;
@ -10083,7 +10091,8 @@
link:function(){ link:function(){
var next=game.createEvent('link'); var next=game.createEvent('link');
next.player=this; next.player=this;
next.content=lib.element.content.link; next.setContent('link');
return next;
}, },
skip:function(name){ skip:function(name){
this.skipList.add(name); this.skipList.add(name);
@ -14196,7 +14205,7 @@
next:[], next:[],
}; };
_status.paused=false; _status.paused=false;
game.createEvent('game',false).content=lib.init.startOnline; game.createEvent('game',false).setContent(lib.init.startOnline);
game.loop(); game.loop();
game.send('inited'); game.send('inited');
}); });
@ -14387,7 +14396,7 @@
game.updateState(state2); game.updateState(state2);
} }
var next=game.createEvent('game',false); var next=game.createEvent('game',false);
next.content=lib.init.startOnline; next.setContent(lib.init.startOnline);
if(observe){ if(observe){
next.custom.replace.target=function(player){ next.custom.replace.target=function(player){
if(!lib.configOL.observe_handcard&&lib.configOL.mode=='guozhan'){ if(!lib.configOL.observe_handcard&&lib.configOL.mode=='guozhan'){
@ -14605,10 +14614,10 @@
} }
} }
if(_status.connectMode){ if(_status.connectMode){
next.content=lib.element.content.replaceHandcardsOL; next.setContent('replaceHandcardsOL');
} }
else{ else{
next.content=lib.element.content.replaceHandcards; next.setContent('replaceHandcards');
} }
}, },
removeCard:function(name){ removeCard:function(name){
@ -14766,7 +14775,7 @@
waitForPlayer:function(func){ waitForPlayer:function(func){
var next=game.createEvent('waitForPlayer',false); var next=game.createEvent('waitForPlayer',false);
next.func=func; next.func=func;
next.content=lib.element.content.waitForPlayer; next.setContent('waitForPlayer');
}, },
countDown:function(time,onEnd){ countDown:function(time,onEnd){
time=parseInt(time); time=parseInt(time);
@ -15591,7 +15600,7 @@
lib.character[j]=lib.character[j]||lib.characterPack[i][j]; lib.character[j]=lib.character[j]||lib.characterPack[i][j];
} }
} }
next.content=lib.element.content.playVideoContent; next.setContent('playVideoContent');
game.loop(); game.loop();
}, },
videoContent:{ videoContent:{
@ -17092,7 +17101,7 @@
next.player=player; next.player=player;
next.triggername=name; next.triggername=name;
next._trigger=event; next._trigger=event;
next.content=lib.element.content.createTrigger; next.setContent('createTrigger');
}, },
createEvent:function(name,trigger,triggerevent){ createEvent:function(name,trigger,triggerevent){
var next={ var next={
@ -18761,14 +18770,14 @@
} }
} }
game.createEvent('game',false).content=mode[lib.config.mode].start; game.createEvent('game',false).setContent(mode[lib.config.mode].start);
game.loop(); game.loop();
}); });
}, },
loadMode:function(mode){ loadMode:function(mode){
var next=game.createEvent('loadMode'); var next=game.createEvent('loadMode');
next.mode=mode; next.mode=mode;
next.content=lib.element.content.loadMode; next.setContent('loadMode');
}, },
loadPackage:function(){ loadPackage:function(){
var next=game.createEvent('loadPackage'); var next=game.createEvent('loadPackage');

View File

@ -629,7 +629,7 @@ mode.chess={
var next=game.createEvent('chooseToMove'); var next=game.createEvent('chooseToMove');
next.num=num||1; next.num=num||1;
next.player=this; next.player=this;
next.content=lib.element.content.chooseToMove; next.setContent('chooseToMove');
next.prompt=prompt; next.prompt=prompt;
return next; return next;
}, },
@ -1557,7 +1557,7 @@ mode.chess={
var next=game.createEvent('replaceChessPlayer'); var next=game.createEvent('replaceChessPlayer');
next.playername=name; next.playername=name;
next.enemy=enemy; next.enemy=enemy;
next.content=lib.element.content.replaceChessPlayer; next.setContent('replaceChessPlayer');
}, },
removeTreasure:function(player){ removeTreasure:function(player){
game.addVideo('removeTreasure',null,player.dataset.position); game.addVideo('removeTreasure',null,player.dataset.position);
@ -2084,7 +2084,7 @@ mode.chess={
if(!info.filter||info.filter(mech)){ if(!info.filter||info.filter(mech)){
var next=game.createEvent('chessMech'); var next=game.createEvent('chessMech');
next.player=mech; next.player=mech;
next.content=info.content; next.setContent(info.content);
mech.chessFocus(); mech.chessFocus();
if(lib.config.animation&&!lib.config.low_performance){ if(lib.config.animation&&!lib.config.low_performance){
mech.$epic2(); mech.$epic2();