aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-09-04 14:10:30 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-09-04 14:10:30 -0300
commit4a281dffcf3df607d2182ad4b6c5d37016015b72 (patch)
tree835e528e16c0f08ef72ab071c499cd99a00e5e78
parent13819597ef078096086f03e6faf93f161949799f (diff)
downloadgame-4a281dffcf3df607d2182ad4b6c5d37016015b72.tar.gz
game-4a281dffcf3df607d2182ad4b6c5d37016015b72.zip
reduce MassCreateField radii + exclude origin from CancelInvisibility
-rw-r--r--src/magic.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/magic.cc b/src/magic.cc
index d436960..c69507f 100644
--- a/src/magic.cc
+++ b/src/magic.cc
@@ -2371,7 +2371,10 @@ void CancelInvisibility(TCreature *Actor, Object Target, int ManaPoints, int Sou
Radius = NARRAY(Circle) - 1;
}
- for(int R = 0; R <= Radius; R += 1){
+ // TODO(fusion): We don't include the origin (R=0) to avoid dispelling the
+ // caster as this is only used with the actor also being the target. We could
+ // instead just filter the actor while looping.
+ for(int R = 1; R <= Radius; R += 1){
int CirclePoints = Circle[R].Count;
for(int Point = 0; Point < CirclePoints; Point += 1){
int FieldX = TargetX + Circle[R].x[Point];
@@ -2405,7 +2408,7 @@ void CancelInvisibility(TCreature *Actor, Object Target, int ManaPoints, int Sou
Effect = EFFECT_BLOCK_HIT;
// NOTE(fusion): If the victim still has an illusion effect up, it
- // it must come from an item and it seems there is a change to destroy
+ // must come from an item and it seems there is a chance to destroy
// it on pvp enforced worlds.
// TODO(fusion): This is probably an inlined function.
if(WorldType == PVP_ENFORCED){
@@ -4156,7 +4159,7 @@ void UseMagicItem(uint32 CreatureID, Object Obj, Object Dest){
}
case 17:{
- MassCreateField(Actor, Dest, 0, 0, FIELD_TYPE_FIRE, 3);
+ MassCreateField(Actor, Dest, 0, 0, FIELD_TYPE_FIRE, 2);
break;
}
@@ -4241,7 +4244,7 @@ void UseMagicItem(uint32 CreatureID, Object Obj, Object Dest){
}
case 55:{
- MassCreateField(Actor, Dest, 0, 0, FIELD_TYPE_ENERGY, 3);
+ MassCreateField(Actor, Dest, 0, 0, FIELD_TYPE_ENERGY, 2);
break;
}
@@ -4268,7 +4271,7 @@ void UseMagicItem(uint32 CreatureID, Object Obj, Object Dest){
}
case 91:{
- MassCreateField(Actor, Dest, 0, 0, FIELD_TYPE_POISON, 3);
+ MassCreateField(Actor, Dest, 0, 0, FIELD_TYPE_POISON, 2);
break;
}