[2023/09/18: ①] Handle the array content.
This commit is contained in:
parent
3951791854
commit
09479829fd
22
game/game.js
22
game/game.js
|
@ -28514,8 +28514,26 @@
|
||||||
switch(typeof item){
|
switch(typeof item){
|
||||||
case "object":
|
case "object":
|
||||||
if(Array.isArray(item)){
|
if(Array.isArray(item)){
|
||||||
// TODO: Parse Array
|
let lastEvent=null;
|
||||||
throw new Error("NYI: Parse Common Object");
|
this.content=(event,step,source,player,target,targets,card,cards,skill,forced,num,trigger,result,_status,lib,game,ui,get,ai)=>{
|
||||||
|
if(step>=item.length) return event.finish();
|
||||||
|
var current=item[step];
|
||||||
|
lastEvent=current(event,{
|
||||||
|
event:event,
|
||||||
|
step:step,
|
||||||
|
source:source,
|
||||||
|
player:player,
|
||||||
|
target:target,
|
||||||
|
targets:targets,
|
||||||
|
card:card,
|
||||||
|
cards:cards,
|
||||||
|
skill:skill,
|
||||||
|
forced:forced,
|
||||||
|
num:num,
|
||||||
|
trigger:trigger,
|
||||||
|
result:result
|
||||||
|
},(lastEvent&&("result" in lastEvent))?lastEvent.result:null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
// TODO: Parse Common Object
|
// TODO: Parse Common Object
|
||||||
|
|
Loading…
Reference in New Issue