const E_SLASH1_00=0;const E_SLASH1_01=1;const E_SLASH1_02=2;const E_SLASH1_03=3;const E_SLASH1_04=4;const E_SLASH1_05=5;const E_SLASH1_06=6;const E_SLASH1_07=7;const E_SLASH2_00=8;const E_SLASH2_01=9;const E_SLASH2_02=10;const E_SLASH2_03=11;const E_SLASH2_04=12;const E_SLASH2_05=13;const E_SLASH2_06=14;const E_SLASH2_07=15;const E_CLAW1=16;const E_CLAW2=17;const SLASH_S=77;const SLASH_S_E=20;const E_STRIKE1=18;const E_STRIKE2=19;const E_M_SHOT=20;const E_FIRE=21;const E_ICE=22;const E_THUNDER=23;const E_EXPLOSION=24;const E_HEAL=25;const E_GARD=26;const E_GARD_M=27;const EFFECT_NUM_MAX=256;const EFFECT_EXIST=1;const EFFECT_NOTHING=0;let effectKind=new Array(EFFECT_NUM_MAX);let effect_hg_0=new Array(EFFECT_NUM_MAX);let effect_h_gmax=new Array(EFFECT_NUM_MAX);let effect_ani_count=new Array(EFFECT_NUM_MAX);let effectX=new Array(EFFECT_NUM_MAX);let effectY=new Array(EFFECT_NUM_MAX);let effectSizeX=new Array(EFFECT_NUM_MAX);let effectSizeY=new Array(EFFECT_NUM_MAX);let effectState=new Array(EFFECT_NUM_MAX);function initEffect(){for(let num=0;num<EFFECT_NUM_MAX;num++){effectState[num]=EFFECT_NOTHING}} function mikeEffect(kind,x,y,size_x,size_y,h_gmax){for(let num=0;num<EFFECT_NUM_MAX;num++){if(effectState[num]===EFFECT_NOTHING){effectState[num]=EFFECT_EXIST;effectKind[num]=kind;effectX[num]=x;effectY[num]=y;effectSizeX[num]=size_x;effectSizeY[num]=size_y;effect_h_gmax[num]=h_gmax;effect_ani_count[num]=0;break}}} function drawEffect(){let h_graph;for(let num=0;num<EFFECT_NUM_MAX;num++){if(effectState[num]===EFFECT_EXIST){switch(effectKind[num]){case E_SLASH1_00:h_graph=Graphs.SLASH1_00;break;case E_SLASH1_01:h_graph=Graphs.SLASH1_01;break;case E_SLASH1_02:h_graph=Graphs.SLASH1_02;break;case E_SLASH1_03:h_graph=Graphs.SLASH1_03;break;case E_SLASH1_04:h_graph=Graphs.SLASH1_04;break;case E_SLASH1_05:h_graph=Graphs.SLASH1_05;break;case E_SLASH1_06:h_graph=Graphs.SLASH1_06;break;case E_SLASH1_07:h_graph=Graphs.SLASH1_07;break;case E_SLASH2_00:h_graph=Graphs.SLASH2_00;break;case E_SLASH2_01:h_graph=Graphs.SLASH2_01;break;case E_SLASH2_02:h_graph=Graphs.SLASH2_02;break;case E_SLASH2_03:h_graph=Graphs.SLASH2_03;break;case E_SLASH2_04:h_graph=Graphs.SLASH2_04;break;case E_SLASH2_05:h_graph=Graphs.SLASH2_05;break;case E_SLASH2_06:h_graph=Graphs.SLASH2_06;break;case E_SLASH2_07:h_graph=Graphs.SLASH2_07;break;case E_CLAW1:h_graph=Graphs.CLAW1;break;case E_CLAW2:h_graph=Graphs.CLAW2;break;case E_STRIKE1:h_graph=Graphs.STRIKE1_00;break;case E_STRIKE2:h_graph=Graphs.STRIKE2_00;break;case E_M_SHOT:h_graph=Graphs.M_SHOT00;break;case E_FIRE:h_graph=Graphs.FIRE00;break;case E_ICE:h_graph=Graphs.ICE00;break;case E_THUNDER:h_graph=Graphs.THUNDER00;break;case E_EXPLOSION:h_graph=Graphs.EXPLOSION00;break;case E_HEAL:h_graph=Graphs.HEAL00;break;case E_GARD:h_graph=Graphs.GUARD1_00;break;case E_GARD_M:h_graph=Graphs.GUARD2_00;break} if(effectKind[num]>E_CLAW2){if(effect_ani_count[num]<effect_h_gmax[num]){drawImgS(h_graph+Math.floor(effect_ani_count[num]),effectX[num],effectY[num],effectSizeX[num],effectSizeY[num]);if(effectKind[num]<E_GARD){effect_ani_count[num]++}else{effect_ani_count[num]+=0.1}}else{effectState[num]=EFFECT_NOTHING} let speedFactor=(effectKind[num]>=E_GARD)?10:1;let maxCount=effect_h_gmax[num]*speedFactor;if(effect_ani_count[num]<maxCount){let frameIndex=Math.floor(effect_ani_count[num]/speedFactor);drawImgS(h_graph+frameIndex,effectX[num],effectY[num],effectSizeX[num],effectSizeY[num]);effect_ani_count[num]++}else{effectState[num]=EFFECT_NOTHING}}else{let speed=SLASH_S;if(gameScene===SCENE_ENEMY_ATTACK){speed=SLASH_S_E} drawImgS(h_graph,effectX[num],effectY[num],effectSizeX[num],effectSizeY[num]);switch(effectKind[num]){case E_SLASH1_00:case E_SLASH2_00:effectY[num]+=speed;break;case E_SLASH1_01:case E_SLASH2_01:effectX[num]-=speed*0.7071;effectY[num]+=speed*0.7071;break;case E_SLASH1_02:case E_SLASH2_02:effectX[num]-=speed;break;case E_SLASH1_03:case E_SLASH2_03:effectX[num]-=speed*0.7071;effectY[num]-=speed*0.7071;break;case E_SLASH1_04:case E_SLASH2_04:effectY[num]-=speed;break;case E_SLASH1_05:case E_SLASH2_05:effectX[num]+=speed*0.7071;effectY[num]-=speed*0.7071;break;case E_SLASH1_06:case E_SLASH2_06:effectX[num]+=speed;break;case E_SLASH1_07:case E_SLASH2_07:effectX[num]+=speed*0.7071;effectY[num]+=speed*0.7071;break;case E_CLAW1:effectX[num]-=speed*0.7071;effectY[num]+=speed*0.7071;break;case E_CLAW2:effectX[num]+=speed*0.7071;effectY[num]+=speed*0.7071;break} effect_ani_count[num]++;let drawCount=7;if(gameScene===SCENE_ENEMY_ATTACK){drawCount=7} if(effect_ani_count[num]>drawCount&&SCENE_P_ATTACK){effectState[num]=EFFECT_NOTHING}}}}}