~ubuntu-branches/ubuntu/precise/egoboo-data/precise

« back to all changes in this revision

Viewing changes to modules/catacomb1.mod/objects/bat.obj/script.txt

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2010-04-25 10:20:11 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100425102011-1aosouybjkexdg9v
Tags: 1:2.7.7-1
* New Upstream Release
* Switch to debhelper

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//Different monster types determined by skin:
 
2
//0: Normal bat         (No special abillities)
 
3
//1: Vampyric bat       (Steals life)
 
4
//2: Undead bat         (Very tough, weak vs. holy)
 
5
 
 
6
//------------------------------------------------------------------------------
 
7
//Squeak if damaged
 
8
IfAttacked
 
9
  tmpargument = rand % 2 + 2            //Random ouch sound (sound 2 or 3)
 
10
  tmpdistance = rand & 3400 + 9000
 
11
  PlaySound
 
12
  GetDamageType
 
13
  tmpx = tmpargument
 
14
  tmpy = DAMAGEHOLY
 
15
  IfXIsEqualToY                 //Holy damage is instant kill
 
16
    SetTargetToSelf
 
17
    KillTarget
 
18
    SetTargetToWhoeverAttacked
 
19
    tmpargument = 10            //Give some bonus xp
 
20
    tmpdistance = EXPREVENGE
 
21
    GiveExperienceToTarget
 
22
    tmpargument = 1             //Banishment sound
 
23
    tmpdistance = rand & 4600 + 11000
 
24
    PlaySound
 
25
 
 
26
//------------------------------------------------------------------------------
 
27
//Tell others its healed
 
28
IfHealed
 
29
  tmpargument = 2
 
30
  SendMessageNear
 
31
 
 
32
//------------------------------------------------------------------------------
 
33
//Handle death stuff
 
34
IfKilled
 
35
  SetTargetToWhoeverAttacked
 
36
  //Handle Messaging
 
37
  IfTargetIsOnSameTeam
 
38
    tmpargument = 1             //Killed self
 
39
  Else
 
40
    tmpargument = 0
 
41
    IfArmorIs
 
42
      tmpargument = 0           //Normal bat
 
43
    Else
 
44
      tmpargument = 1
 
45
      IfArmorIs
 
46
        tmpargument = 3         //Vampyric bat
 
47
      Else
 
48
        tmpargument = 4         //Killed normally
 
49
  SendMessageNear
 
50
 
 
51
  tmpargument = 1               //Bonus xp
 
52
  IfArmorIs
 
53
    tmpargument = 10
 
54
    GiveExperienceToTargetTeam
 
55
 
 
56
  tmpargument = 2               //Bonus xp
 
57
  IfArmorIs
 
58
    tmpargument = 25
 
59
    GiveExperienceToTargetTeam
 
60
 
 
61
  //Unbumpable body
 
62
  tmpargument = 0
 
63
  SetBumpHeight
 
64
  SetBumpSize
 
65
 
 
66
  //Death sound
 
67
  tmpargument = 0
 
68
  tmpdistance = rand & 3800 + 11000
 
69
  PlaySound
 
70
 
 
71
//------------------------------------------------------------------------------
 
72
//What to do if bumped
 
73
IfBumped
 
74
  SetTargetToWhoeverBumped
 
75
  IfTargetIsOnHatedTeam
 
76
    tmpargument = rand & 75 + 74
 
77
    SetTime
 
78
    tmpx = rand & 1500 + targetx - 750
 
79
    tmpy = rand & 1500 + targety - 750
 
80
    ClearWaypoints
 
81
    AddWaypoint
 
82
 
 
83
    //Bite the enemy                            //Must look at him
 
84
    IfTargetIsAlive                             //Cant attack dead ones
 
85
      tmpargument = rand & 256 + 348            //1.50-2.50 damage
 
86
      tmpdistance = DAMAGEPOKE
 
87
      DamageTarget
 
88
      tmpargument = 1
 
89
      IfArmorIs
 
90
        tmpargument = rand & 128 + 64           //Heal 0.25 - 0.60 life
 
91
        SetTargetToSelf
 
92
        HealTarget
 
93
        SetTargetToOldTarget
 
94
 
 
95
  //Move out of way of friends
 
96
  IfTargetIsOnSameTeam
 
97
    tmpx = rand & 511 - 256 + targetx
 
98
    tmpy = rand & 511 - 256 + targety 
 
99
    ClearWaypoints
 
100
    AddWaypoint
 
101
    SetTargetToOldTarget
 
102
    tmpargument = rand & 20 + 20
 
103
    SetTime
 
104
 
 
105
//------------------------------------------------------------------------------
 
106
//Leader stuff
 
107
IfLeaderKilled
 
108
  BecomeLeader
 
109
IfSpawned
 
110
  BecomeLeader          //Always have at least 1 leader
 
111
 
 
112
 
 
113
//------------------------------------------------------------------------------
 
114
//What to do each round
 
115
IfTimeOut
 
116
  tmpargument = rand & 15 + 40
 
117
  SetTime
 
118
  SetTargetToWideEnemy                          //Locate enemy
 
119
    tmpx = targetx
 
120
    tmpy = targety
 
121
    tmpturn = rand & 4095 - 2048 + targetturnto
 
122
    tmpdistance = 700
 
123
    Compass
 
124
  Else                                          //No enemies, flock around leader
 
125
    tmpx = rand & 1500 + selfspawnx - 750
 
126
    tmpy = rand & 1500 + selfspawny - 750
 
127
 
 
128
//    tmpx = rand & 1500 + leaderx - 750
 
129
//    tmpy = rand & 1500 + leadery - 750
 
130
  tmpargument = 100                             //Bats are fast
 
131
  SetSpeedPercent
 
132
  ClearWaypoints
 
133
  AddWaypoint
 
134
 
 
135
  //Random growl sound
 
136
  tmpx = rand & 900
 
137
  tmpy = 3
 
138
  IfXIsLessThanY
 
139
    tmpargument = 4
 
140
    tmpdistance = rand & 3000 + 14000
 
141
    PlaySound
 
142
 
 
143
//------------------------------------------------------------------------------
 
144
End                                     // Finished with this character
 
145
//------------------------------------------------------------------------------
 
 
b'\\ No newline at end of file'