6 Look for pets (monsters owned by the player) who are not marked as friendly.
7 Then try to re-pet them with a 1 in 10 change to fail.
9 Some pets miss their Friendly flag only, others also miss the IsPet property.
10 Others also have the wrong value for attack_movement which should be PETMOVE for pets.
13 PETMOVE = Crossfire.AttackMovement.PETMOVE
14 player = Crossfire.WhoIsActivator()
15 if player.Type != Crossfire.Type.PLAYER:
17 Crossfire.SetReturnValue( 1 )
25 for w
in range(player.X-5, player.X+5):
26 if w<1
or w>range(player.Map.Width):
28 for h
in range(player.Y-5, player.Y+5):
29 if h<1
or h>range(player.Map.Height):
31 obj = player.Map.ObjectAt(w,h)
33 if obj.Monster
and obj.Owner == player
and not obj.Friendly:
35 if random.randint(0,9):
39 if obj.AttackMovement != PETMOVE:
40 obj.AttackMovement = PETMOVE
41 player.Write(
'Your %s looks at you tenderly, fearless at your enemies.' % obj.Name )
43 player.Write(
'Your %s is still angry with you.' % obj.Name )
46 player.Write(
'Fzzzzzzzz...')