Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case itype_wand:
- {
- //!Dimentio Edit Territory
- int wandfireweapon1 = current_item_id(itype_wand); //I'm doing it the long way to test this, as I have no idea if doing it the shorter way will cause problems
- // int wandfireweapon3; //Store the weapon value in here, for use later/to prevent 27 copies of the new weapon code.
- /*
- switch(itemsbuf[wandfireweapon1].misc1) //Okay, what weapon will the wand fire?
- {
- case 0: wandfireweapon3 = wMagic; //Magic is default.
- break;
- case 1: wandfireweapon3 = wArrow; //Arrows?
- break;
- case 2: wandfireweapon3 = wFire; //Fire?
- break;
- case 3: wandfireweapon3 = wWind; //Wind?
- break;
- case 4: wandfireweapon3 = wRefMagic; //Reflected Magic?
- break;
- case 5: wandfireweapon3 = wRefFireball; //Reflected Fireball?
- break;
- case 6: wandfireweapon3 = wRefRock; //Reflected Rock?
- break;
- case 7: wandfireweapon3 = wRefBeam; //Reflected Sword Beam?
- break;
- case 8: wandfireweapon3 = wBrang; //Boomerang?
- break;
- case 9: wandfireweapon3 = wBeam; //Sword Beam?
- break;
- //Less sure about the following ones:
- case 10: wandfireweapon3 = wLitBomb; //Bomb?
- break;
- case 11: wandfireweapon3 = wLitSBomb; //SuperBomb?
- break;
- case 12: wandfireweapon3 = wBomb; //Explosion?
- break;
- case 13: wandfireweapon3 = wSBomb; //Super Explosion?
- break;
- case 14: wandfireweapon3 = wSSparkle; //Sparkle?
- break;
- case 15: wandfireweapon3 = wFSparkle; //Fire Sparkle?
- break;
- case 16: wandfireweapon3 = wHookshot; //Hookshot?
- break;
- case 17: wandfireweapon3 = wBait; //Woo! BaitWand!
- //Script weapon time!
- case 18: wandfireweapon3 = wScript1;
- break;
- case 19: wandfireweapon3 = wScript2;
- break;
- case 20: wandfireweapon3 = wScript3;
- break;
- case 21: wandfireweapon3 = wScript4;
- break;
- case 22: wandfireweapon3 = wScript5;
- break;
- case 23: wandfireweapon3 = wScript6;
- break;
- case 24: wandfireweapon3 = wScript7;
- break;
- case 25: wandfireweapon3 = wScript8;
- break;
- case 26: wandfireweapon3 = wScript9;
- break;
- case 27: wandfireweapon3 = wScript10;
- break;
- }
- */
- if(Lwpns.idCount(itemsbuf[wandfireweapon1].misc1))
- return false;
- int bookid = current_item_id(itype_book);
- bool paybook = (bookid>-1 && checkmagiccost(bookid));
- if(!(itemsbuf[itemid].flags&ITEM_FLAG1) && !paybook) //Can the wand shoot without the book?
- return false;
- if(!checkmagiccost(itemid))
- return false;
- //Why is this here? -Z
- if(Lwpns.idCount(wBeam))
- Lwpns.del(Lwpns.idFirst(wBeam));
- int type = bookid != -1 ? current_item(itype_book) : itemsbuf[itemid].fam_type;
- int pow = (bookid != -1 ? current_item_power(itype_book) : itemsbuf[itemid].power)*DAMAGE_MULTIPLIER;
- for(int i=(spins==1?up:dir); i<=(spins==1 ? right:dir); i++)
- if(dir!=(i^1))
- {
- //YOu don;t need any of those case statements until you want to do somethign special with each type.
- //Try this, for now.
- Lwpns.add(new weapon((fix)wx,(fix)wy,(fix)wz,itemsbuf[wandfireweapon1].misc1,type,pow,i, itemid,getUID())); //!Dimentio: wandfireweapon3 is what weapon the wand fires. Determined just above.
- weapon *w = (weapon*)Lwpns.spr(Lwpns.Count()-1);
- w->LOADGFX(itemsbuf[wandfireweapon1].wpn3 + w->dir); //use Sprites[2]
- w->step = itemsbuf[wandfireweapon1].misc2; //Attributes[1]
- }
- paymagiccost(itemid);
- if(paybook)
- paymagiccost(current_item_id(itype_book));
- if(bookid != -1)
- sfx(itemsbuf[bookid].usesound,pan(wx));
- else
- sfx(itemsbuf[itemid].usesound,pan(wx));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement