1{ 2id: "stagmite", 3prototype: ["hittable"], 4mass: 5, 5friction: 1000, 6traction: 1000, 7timer_frequency: 2, 8hitpoints: 200, 9solid_area: [5,10,20,25], 10solid_dimensions: ["enemy","common"], 11properties: { 12 team: "evil", 13 turns_towards_player: "null()", 14 attack_damage: "if(animation = 'angry', 3, 1)", 15}, 16vars: { 17 points_value: 4, 18 horn: null, 19}, 20consts: { 21 size: 48, 22 basic_type: "stagmite", 23}, 24editor_info: { 25 category: "enemies, experimental", 26}, 27 28on_die: "[spawn_item(self), death_burst_tracked(self)]", 29 30on_collide_object_armored: "if(collide_with.team != team and collide_with.team != 'evil_harmless' and (not (collide_with.team = 'evil' and team = 'evil_harmless')), 31 if(collide_with_area in ['attack','thrown'] and (not (animation in ['angry'])), set(animation, 'angry')))", 32on_collide_side: "if(collide_with != level.player, [set(velocity_x,-velocity_x/2),set(facing, -facing),animation('turn')])", 33on_collide_head: "set(velocity_y, -velocity_y/2)", 34on_collide_feet: "animation('walk')", 35on_bounced_on: "animation('spring')", 36on_surface_damage: "die()", 37 38on_end_anim: "animation('walk')", 39on_enter_walk_anim: "if(not is_standing, animation('stand'))", 40on_process_stand: "if(is_standing, animation('walk'))", 41on_enter_water: "die()", 42on_timer: "[set(rotate, slope_standing_on), if(is_standing and animation in ['walk','run'] and (should_turn_away_from_cliff or should_turn_towards_player),turn_around(),null)]", 43on_end_turn_anim: "animation('walk')", 44on_end_hurt_anim: "animation('walk')", 45on_stuck: "if(not solid(level, midpoint_x, y+self.img_h-10), add(velocity_y, -1200), add(velocity_x, 1d600-300))", 46 47animation: [ 48 { 49 "@base": true, 50 image: "experimental/stagmite.png", 51 rotate_on_slope: true, 52 pad: 3, 53 accel_x: 0, 54 accel_y: 80, 55 body_area: [0,0,13,27], 56 armored_area: [14,0,24,27] 57 }, 58 { 59 id: "stand", 60 rect: [3,1,27,28], 61 frames: 1, 62 duration: 6, 63 attack_area: [15,18,26,26], 64 }, 65 { 66 id: "angry", 67 rect: [3,1,27,28], 68 frames: 1, 69 accel_x: 10000, 70 accel_y: -80, 71 duration: 10, 72 attack_area: [15,18,26,26], 73 }, 74 { 75 id: "walk", 76 #blink variant 77 attack_area: [15,18,26,26], 78 accel_x: 250, 79 rect: [89,1,113,28], 80 frames: 3, 81 duration: 6, 82 }, 83 { 84 id: "walk", 85 attack_area: [15,18,26,26], 86 duplicates: 6, 87 accel_x: 250, 88 rect: [3,1,27,28], 89 frames: 3, 90 duration: 6, 91 }, 92 { 93 id: "spring", 94 rect: [3,33,27,60], 95 frames: 1, 96 duration: 4, 97 }, 98 { 99 id: "turn", 100 rect: [3,65,27,92], 101 frames: 3, 102 duration: 4, 103 attack_area: [0,18,26,26], 104 }, 105 { 106 id: "hurt", 107 rect: [90,65,114,92], 108 frames: 1, 109 duration: 18, 110 } 111], 112} 113