Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int I_SHIELD4 = 134;
- ffc script shields //Dummy script, used for namespace purposes. No need to assign to a slot.
- {
- void run(){}
- void blockbomb()
- {
- if ( Link->Action != LA_WALKING && Link->Action != LA_NONE ) return; //Abort
- if ( Link->Item[I_SHIELD4] )
- {
- for ( int q = Screen->NumEWeapons(); q > 0; --q )
- {
- eweapon e = Screen->LoadEWeapon(q);
- if ( e->ID == EW_BOMBBLAST || e->ID == EW_SBOMBBLAST )
- {
- if ( Link->Dir == DIR_UP )
- {
- if ( e->Y < Link->Y+8 ) e->HitYOffset = -32768;
- }
- else if ( Link->Dir == DIR_DOWN )
- {
- if ( e->Y > Link->Y+8 ) e->HitYOffset = -32768;
- }
- else if ( Link->Dir == DIR_LEFT )
- {
- if ( e->X < Link->X+8 ) e->HitYOffset = -32768;
- }
- else if ( Link->Dir == DIR_RIGHT )
- {
- if ( e->X > Link->X+8 ) e->HitYOffset = -32768;
- }
- }
- }
- for ( int q = Screen->NumLWeapons(); q > 0; --q )
- {
- lweapon e = Screen->LoadLWeapon(q);
- if ( e->ID == LW_BOMBBLAST || e->ID == LW_SBOMBBLAST )
- {
- if ( Link->Dir == DIR_UP )
- {
- if ( e->Y < Link->Y+8 ) e->HitYOffset = -32768;
- }
- else if ( Link->Dir == DIR_DOWN )
- {
- if ( e->Y > Link->Y+8 ) e->HitYOffset = -32768;
- }
- else if ( Link->Dir == DIR_LEFT )
- {
- if ( e->X < Link->X+8 ) e->HitYOffset = -32768;
- }
- else if ( Link->Dir == DIR_RIGHT )
- {
- if ( e->X > Link->X+8 ) e->HitYOffset = -32768;
- }
- }
- }
- }
- }
- }
- global script test
- {
- void run()
- {
- while(1)
- {
- shields.blockbomb();
- Waitframe();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement