//action script for the spell "Thunder" item script Thunder_Spell{ void run(int Sound_ID, int Script_ID, int Color, int Duration){ int numberofnpc = Screen->NumNPCs(); int index; for(index = 1; index <= numberofnpc; index +=1){ npc enemy = Screen->LoadNPC(index); if(enemy->isValid() == true){ if(enemy->Defense[NPCD_BOMB] != NPCDT_BLOCK){ enemy->X = -1000; } } } int args[8] = {Color, Duration}; RunFFCScript(Script_ID, args); Game->PlaySound(Sound_ID); } } item script Flash{ void run(int Sound_ID, int Script_ID, int Color, int Duration){ int args[8] = {Color, Duration}; RunFFCScript(Script_ID, args); Game->PlaySound(Sound_ID); } } //this ffc script adds the flashing functionality for the spell "Thunder". ffc script Thunder_Functionality{ void run(int color, int duration){ while(duration > 0){ if(duration % 2 == 0) Screen->Rectangle(6, 0, 0, 256, 172, color, 1, 0, 0, 0, true, 64); duration--; Waitframe(); } } }