PDA

View Full Version : Fairy Spell from AoL?



redmage777
02-28-2009, 06:07 PM
Those of you who are unfamiliar with the fairy spell:
It is a spell from the second Zelda game which allowed Link to shape-shift into a fairy and fly over obstacles while he was on that screen.

How it should work in Zelda Classic:
Link sets it as an A/B item and activates it, While he is a fairy, he cant use items but can only be blocked by "no fly zones." To deactivate it, the player pushes the A or B button and becomes human again. In order to prevent abuse of the spell, Link should have to deactivate the spell before he can walk onto the next screen.


One of these days I'll have to learn scripting myself but until that day comes...

Pielord
02-28-2009, 08:10 PM
There's a guy over at pure who's making a Z2 remake:
http://www.purezc.com/forums/index.php?showtopic=39651 There might be a tread here but I'm too lazy to look.
He's not on the spells yet but he said he'll release the scripts when he's done.

redmage777
03-01-2009, 01:49 AM
Yes I've seen that one, amazing work I must say... And yes common sense should have told me he would eventually have to produce a Fairy spell.

pkmnfrk
03-01-2009, 11:20 AM
The main issue I see in this regard would be the "ignoring walls" bit. But, if I had to take a quick, untested stab at it, I would probably write something like:


bool isFairy = false;
bool inFairy = false;
const int fairyItem = 1234; //for the sprite modification

global script slot2 {
void run() {
while(true) {

if(isFairy()) doFairy();

Waitframe();
}
}

void doFairy() {
if(!inFairy) {
Link->Item[fairyItem] = true;
Link->Action = LA_NONE;
inFairy = true;
}

if(Link->InputUp) {
Link->Dir = DIR_UP;
if(Link->Y > 3) Link->Y -= 2;
}

if(Link->InputDown) {
Link->Dir = DIR_DOWN;
if(Link->Y < 173) Link->Y += 2;
}

if(Link->InputLeft) {
Link->Dir = DIR_LEFT;
if(Link->X > 3) Link->X -= 2;
}

if(Link->InputRight) {
Link->Dir = DIR_RIGHT;
if(Link->X < 253) Link->X += 2;
}

if(Link->InputA) {
Link->Item[fairyItem] = false;
inFairy = false;
isFairy = false;
}

}

}

item script fairySpell {
void run() {
isFairy = true;
}
}

Warning: Totally untested or syntax checked.

You need to make two items: one is the spell (which gets the item script above), and the other is a hidden item which serves only to modify Link's sprite. Put the sprite item's ID into the constant in the script at the top.