View Single Post
Old March 16, 2020, 08:37   #10
DavidMedley
Knight
 
Join Date: Oct 2019
Posts: 671
DavidMedley is on a distinguished road
OK, this is a pretty big ask, but I'll put it out into the universe and see what happens.

I want to create a spell that includes a melee blow as one of its effects. I've looked at
Code:
static bool py_attack_real(struct player *p, struct loc grid, bool *fear)
/**Attack the monster at the given location with a single blow.*/
And that seems to be perfect for what I have in mind, so I shouldn't have to write a whole new attack sequence.

But when I look at
Code:
bool spell_cast(int spell_index, int dir) {
...
	effect_do(spell->effect, source_player(), NULL, ident, true, dir, beam, 0)
...
}
It's really abstract and hard to follow. This probably makes it very flexible and powerful and (I'm hoping) pretty easy to get it to do what I want.

So can anyone provide me with hints or examples of how to do this?
DavidMedley is offline   Reply With Quote