Coh3n
2010-11-10 19:41:27
I've been working on MSI_SetupMagic for the last couple days, and I haven't really been able to come up with a good way to handle staffs. In another thread, we talked about having the user set the staffs they'll be using, so a setup could look like:
with Scripts[0] do
begin
Name := SCRIPT_MAGE_FIGHTER;
Spells := [SPELL_EARTH_STRIKE, SPELL_FIRE_STRIKE];
Staffs := [STAFF_EARTH, STAFF_FIRE];
Monsters := [NPC_DEMON_LESSER];
end;
Where the staffs would correspond to the spells - STAFF_EARTH would go with SPELL_EARTH_STRIKE and STAFF_FIRE would go with SPELL_FIRE_STRIKE. The problem with that is the user may not want to use a staff for earth strike, in which case it would try to use a fire staff with earth strike. A solution I thought of - one I don't particularly like - is fill the empty indexes with -1:
with Scripts[0] do
begin
Name := SCRIPT_MAGE_FIGHTER;
Spells := [SPELL_EARTH_STRIKE, SPELL_FIRE_STRIKE];
Staffs := [-1, STAFF_FIRE];
Monsters := [NPC_DEMON_LESSER];
end;
I also thought that maybe I'm going about this the wrong way, and having only one staff would be enough, so the staff could be found and equipped automatically, rather than set in DeclarePlayers. I would, however, like the user to have the option of multiple staffs. Another example would be when enchanting: maybe there are 10 sapphire rings and 10 emerald necklaces. They both require cosmic runes, but need different additional runes/staffs.I'm looking for comments, suggestions, anything really.
On another note: a little update on Magic.simba. For MSI_SetupMagic, it successfully counts the runes in the players inventory and calculates the amount of casts for each spell in the array. It also works if two spells require the same runes.
Cheers,
Coh3n