1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
|
[prototype]
has_feet="no"
id="stalagmite"
object_level_collisions="true"
on_collide="die()"
on_collide_level="die()"
on_collide_object_attack="[
if(collide_with.vars.team != vars.team and collide_with_area = 'body', die())]"
on_collide_object_body="if(collide_with.vars.team != vars.team and collide_with_area = 'attack', [get_hit_by(collide_with),die()])"
on_create="[if(vars.zone_x1 > vars.zone_x2, [set(vars.zone_x1, vars.zone_x2), set(vars.zone_x2, vars.zone_x1)]),
if(vars.zone_y1 > vars.zone_y2, [set(vars.zone_y1, vars.zone_y2), set(vars.zone_y2, vars.zone_y1)])]"
on_die="map([1] * 10, spawn('stalagmite.fragment', midpoint_x, midpoint_y + 1d30 - 1d30, facing))"
on_timer="if(level.player.midpoint_x > vars.zone_x1 and level.player.midpoint_x < vars.zone_x2 and level.player.midpoint_y > vars.zone_y1 and level.player.midpoint_y < vars.zone_y2, set(accel_y, 60))"
solid_dimensions="enemy,player,common"
timer_frequency="2"
[properties]
get_hit_by="def(collide_with) if(not (me in collide_with.tmp.already_hit), [
set(collide_with.tmp, 'already_hit', collide_with.tmp.already_hit + [me]),
set(me.hitpoints, me.hitpoints - collide_with.vars.damage), if(me.hurt_velocity_y, set(me.velocity_y,me.hurt_velocity_y)), if(me.hurt_velocity_x, set(me.velocity_x,me.hurt_velocity_x * collide_with.facing))])"
hurt_velocity_x="0"
hurt_velocity_y="0"
[/properties]
[animation]
attack_area="all"
duration="50"
frames="1"
frames_per_row="1"
id="normal"
image="props/stalagmites.png"
pad="0"
palettes="cave_brown,cave_deep"
rect="1,1,16,36"
[/animation]
[animation]
attack_area="all"
duration="50"
frames="1"
frames_per_row="1"
id="normal"
image="props/stalagmites.png"
pad="0"
palettes="cave_brown,cave_deep"
rect="22,1,37,36"
[/animation]
[animation]
attack_area="all"
duration="50"
frames="1"
frames_per_row="1"
id="normal"
image="props/stalagmites.png"
pad="0"
palettes="cave_brown,cave_deep"
rect="43,1,58,36"
[/animation]
[vars]
damage="1"
team="'evil'"
zone_x1="0"
zone_x2="0"
zone_y1="0"
zone_y2="0"
[/vars]
[object_type]
dies_on_inactive="yes"
id="fragment"
on_create="[set(velocity_x, 1d500 - 1d500), set(velocity_y, -1d500)]"
on_end_anim="die()"
[animation]
accel_y="60"
duration="50"
frames="1"
frames_per_row="1"
id="particle"
image="props/stalagmites.png"
pad="0"
palettes="cave_brown,cave_deep"
rect="2,40,10,48"
[/animation]
[animation]
accel_y="60"
duration="50"
frames="1"
frames_per_row="1"
id="particle"
image="props/stalagmites.png"
pad="0"
palettes="cave_brown,cave_deep"
rect="14,40,22,48"
[/animation]
[animation]
accel_y="60"
duration="50"
frames="1"
frames_per_row="1"
id="particle"
image="props/stalagmites.png"
pad="0"
palettes="cave_brown,cave_deep"
rect="26,40,34,48"
[/animation]
[animation]
accel_y="60"
duration="50"
frames="1"
frames_per_row="1"
id="particle"
image="props/stalagmites.png"
pad="0"
palettes="cave_brown,cave_deep"
rect="2,52,10,60"
[/animation]
[animation]
accel_y="60"
duration="50"
frames="1"
frames_per_row="1"
id="particle"
image="props/stalagmites.png"
pad="0"
palettes="cave_brown,cave_deep"
rect="14,52,22,60"
[/animation]
[animation]
accel_y="60"
duration="50"
frames="1"
frames_per_row="1"
id="particle"
image="props/stalagmites.png"
pad="0"
palettes="cave_brown,cave_deep"
rect="26,52,34,60"
[/animation]
[/object_type]
[/prototype]
|