~ubuntu-branches/ubuntu/utopic/frogatto-data/utopic

« back to all changes in this revision

Viewing changes to data/object_prototypes/kitty.cfg

  • Committer: Bazaar Package Importer
  • Author(s): Dmitry E. Oboukhov
  • Date: 2010-07-16 12:14:11 UTC
  • Revision ID: james.westby@ubuntu.com-20100716121411-tobhfbyxrrz46dwz
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
[prototype]
 
2
        prototype=hittable
 
3
        solid_dimensions=enemy,common
 
4
 
 
5
 
 
6
        [vars]
 
7
                team="'evil'"
 
8
                damage=1
 
9
                points_value=10
 
10
                turns_at_cliffs=1
 
11
                turns_towards_player=0
 
12
        [/vars]
 
13
 
 
14
        [consts]
 
15
        thrown_damage=10
 
16
        normal_damage=1
 
17
        springiness=200
 
18
        flinch_threshold=1
 
19
        spring_amount=1400
 
20
        bounce_roundness=80
 
21
        [/consts]
 
22
 
 
23
        [properties]
 
24
        choose_action="def() animation('walk')"
 
25
        desired_facing="if(level.player.midpoint_x < self.midpoint_x, -1, 1)"
 
26
        [/properties]
 
27
 
 
28
        [editor_info]
 
29
        category=milgramen
 
30
        [/editor_info]
 
31
        
 
32
        friction=1000
 
33
        traction=1000
 
34
        timer_frequency=5
 
35
        hitpoints=6
 
36
        on_create="animation('stand')"
 
37
        on_enter_anim="set(tmp, 'already_hit', [])"
 
38
        
 
39
        on_die="[score(level,points_value), spawn_item(self), spawn('die_cloud', midpoint_x, midpoint_y, facing)]"
 
40
        on_collide="if(collide_with != level.player, [set(velocity_x,-velocity_x/2),set(facing, -facing),animation('turn')])"
 
41
        on_bounced_on="[add(hitpoints, -5), set(me.green, 0), set(me.blue, 0), schedule(4, [set(me.green, 255), set(me.blue, 255)]), if(jumped_on_by.mass >= 1000, die(), animation('spring'))]"
 
42
        on_enter_water="die()"
 
43
        
 
44
        on_process="set(rotate, slope_standing_on)"
 
45
        on_timer="if(turns_at_cliffs and is_standing and animation = 'walk' and distance_to_cliff < 30,[set(facing, -facing),animation('turn')],null())"
 
46
        on_end_turn_anim="animation('walk')"
 
47
        on_end_walk_anim="choose_action()"
 
48
        
 
49
        on_end_stand_anim="if(is_standing and 1d2 = 2, if(turns_towards_player,set_facing(self,level), choose_action()), animation('stand'))"
 
50
        
 
51
        
 
52
        
 
53
        on_end_hurt_anim="animation('stand')"
 
54
        
 
55
        on_end_spring_anim="animation('walk')"
 
56
        
 
57
        
 
58
        on_surface_damage="die()"
 
59
        feet_width=4
 
60
 
 
61
        functions="
 
62
          #looks for the player and turns to face it#   
 
63
          def set_facing(obj,level) if(desired_facing != obj.facing, [animation('turn'),set(obj,'facing', desired_facing)], animation('walk')
 
64
                   ) where desired_facing = if(level.player.x < obj.x, -1, 1);
 
65
        1"
 
66
 
 
67
[/prototype]