Hit type selects which things the spell affects:
Code:
TbBool explosion_can_affect_thing(struct Thing *thing, long hit_type, long explode_owner)
{
if (thing_is_invalid(thing))
{
WARNLOG("Invalid thing tries to interact with explosion");
return false;
}
switch (hit_type)
{
case 1:
if ((thing->class_id != TCls_Creature) && (thing->class_id != TCls_Object))
return false;
return true;
case 2:
if (thing->class_id != TCls_Creature)
return false;
return true;
case 3:
if ((thing->class_id != TCls_Creature) && (thing->class_id != TCls_Object))
return false;
if (thing->owner == explode_owner)
return false;
return true;
case 4:
if (thing->class_id != TCls_Creature)
return false;
if (thing->owner == explode_owner)
return false;
return true;
case 7:
if (thing->class_id != TCls_Object)
return false;
if (!thing_is_dungeon_heart(thing))
return false;
return true;
case 8:
return true;
default:
WARNLOG("Illegal hit thing type %d for explosion",(int)hit_type);
return true;
}
}
I improved the comment in CFG file:
Code:
[spell24]
Name = WORD_OF_POWER
Duration = 0
; For spells that can damage surrounding area - hit type, range and damage.
; Hit type controls which things will be affected by the spell (1..4).
; The damage will be at its max only very near to the casting point;
; at distance it will start decaying, until zero is reached at given range.
; Range is in subtiles, damage is in points per turn.
; Note that range and duration are increased by 20% x caster exp level.
AreaDamage = 4 3 85
EDIT:
Oh, and the pushback effect strength is currently hard-coded, and applied only for explosions (not to WOP trap, but to WOP spell - yes).