>
>If you do like I originally had, it was a for(i=num_hits(ch); i; i--)
>loop. Make sure the call to weapon_spell() is outside the loop.
>Make sure to define hit=FALSE in the definitions, hit=TRUE only in the
>section where ch does hit the victim.
>
> >what kind of annoying problems would that be? so that i won't be
>surprised
> >when i get them :)
>
>The two most annoying to me were:
>1: You can't just delete a spell using just that snippet code.
> You need to add some code like (It's been a while, so this may be off
> a li'l bit.):
> in case OEDIT_WEAPON_SPELLS:
> if(!(number = atoi(arg)) {
> OLC_OBJ(d)->wpn_spells[OLC_VAL(d)].spell = 0;
> OLC_OBJ(d)->wpn_spells[OLC_VAL(d)].percent = 0;
> OLC_OBJ(d)->wpn_spells[OLC_VAL(d)].level = 0;
> break;
> } else { .... rest of code }
>
>
> Now if you enter 0 for the spellnum it'll delete that spell.
>
>2: It didn't handle 'helpful' spells like cure serious. It took I think
>2 or 3 supporting functions to handle those nice & neatly.
>
>3: (Yeah, I know I said 2) if you have ranged combat, it's going to take
>lots and lots of checking, tweaking, and twiddling to fit them in nicely
>with however you implemented it.
>
> >is it easy to implement the weapon spells into stat and identify?
>piece of cake.
>
>in stat/ident just check for obj->wpn_spells[0].spell != 0
>then just a quick loop from 0 -> MAX_WPN_SPELLS until spell == 0 again,
>with:
>#define wsp obj->wpn_spells[counter]
> send_to_char(ch, "Casts %s at level %d, %d%% of the time.\r\n",
> spell_info[wsp.spell], wsp.level, wsp.percent);
>#undef wsp
>
>
>I'm still thinking of finding my last version before I rewrote combat
>altogether (went to speed/initiative based combat, and handling weapon
>spells became a little bit more of a nightmare.)
Well, i seem to have everything i need now for this snippet :)
i'll put it in tomorrow though..
thanx for the help! :)
if i find it impossible to make this work, i'll send in another reply :)
thanx again!
//Peter
_________________________________________________________________
Med MSN Foto kan du enkelt dela med dig av dina fotografier och beställa
kopior: http://photos.msn.se
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
| Newbie List: http://groups.yahoo.com/group/circle-newbies/ |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT