aboutsummaryrefslogtreecommitdiff
path: root/src/crnonpl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/crnonpl.cc')
-rw-r--r--src/crnonpl.cc86
1 files changed, 44 insertions, 42 deletions
diff --git a/src/crnonpl.cc b/src/crnonpl.cc
index e7fb9b4..3ec73dc 100644
--- a/src/crnonpl.cc
+++ b/src/crnonpl.cc
@@ -2593,57 +2593,59 @@ void TMonster::IdleStimulus(void){
}
if(Impact != NULL){
- switch(SpellData->Shape){
- case SHAPE_ACTOR:{
- int Effect = SpellData->ShapeParam1;
- ActorShapeSpell(this, Impact, Effect);
- break;
- }
+ if(!Impact->isAggressive() || (this->Target != 0 && this->Target != this->Master)){
+ switch(SpellData->Shape){
+ case SHAPE_ACTOR:{
+ int Effect = SpellData->ShapeParam1;
+ ActorShapeSpell(this, Impact, Effect);
+ break;
+ }
- case SHAPE_VICTIM:{
- if(Target != NULL){
- this->Rotate(Target);
+ case SHAPE_VICTIM:{
+ if(Target != NULL){
+ this->Rotate(Target);
- int Range = SpellData->ShapeParam1;
- int Animation = SpellData->ShapeParam2;
- int Effect = SpellData->ShapeParam3;
- VictimShapeSpell(this, Target, Range,
- Animation, Impact, Effect);
+ int Range = SpellData->ShapeParam1;
+ int Animation = SpellData->ShapeParam2;
+ int Effect = SpellData->ShapeParam3;
+ VictimShapeSpell(this, Target, Range,
+ Animation, Impact, Effect);
+ }
+ break;
}
- break;
- }
- case SHAPE_ORIGIN:{
- int Radius = SpellData->ShapeParam1;
- int Effect = SpellData->ShapeParam2;
- OriginShapeSpell(this, Radius, Impact, Effect);
- break;
- }
+ case SHAPE_ORIGIN:{
+ int Radius = SpellData->ShapeParam1;
+ int Effect = SpellData->ShapeParam2;
+ OriginShapeSpell(this, Radius, Impact, Effect);
+ break;
+ }
- case SHAPE_DESTINATION:{
- if(Target != NULL){
- this->Rotate(Target);
+ case SHAPE_DESTINATION:{
+ if(Target != NULL){
+ this->Rotate(Target);
- int Range = SpellData->ShapeParam1;
- int Animation = SpellData->ShapeParam2;
- int Radius = SpellData->ShapeParam3;
- int Effect = SpellData->ShapeParam4;
- DestinationShapeSpell(this, Target, Range,
- Animation, Radius, Impact, Effect);
+ int Range = SpellData->ShapeParam1;
+ int Animation = SpellData->ShapeParam2;
+ int Radius = SpellData->ShapeParam3;
+ int Effect = SpellData->ShapeParam4;
+ DestinationShapeSpell(this, Target, Range,
+ Animation, Radius, Impact, Effect);
+ }
+ break;
}
- break;
- }
- case SHAPE_ANGLE:{
- if(Target != NULL){
- this->Rotate(Target);
- }
+ case SHAPE_ANGLE:{
+ if(Target != NULL){
+ this->Rotate(Target);
+ }
- int Angle = SpellData->ShapeParam1;
- int Range = SpellData->ShapeParam2;
- int Effect = SpellData->ShapeParam3;
- AngleShapeSpell(this, Angle, Range, Impact, Effect);
- break;
+ int Angle = SpellData->ShapeParam1;
+ int Range = SpellData->ShapeParam2;
+ int Effect = SpellData->ShapeParam3;
+ AngleShapeSpell(this, Angle, Range, Impact, Effect);
+ break;
+ }
}
}