~ubuntu-branches/ubuntu/trusty/plee-the-bear/trusty-proposed

« back to all changes in this revision

Viewing changes to plee-the-bear/src/ptb/monster.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Julien Jorge, Julien Jorge
  • Date: 2010-11-17 20:13:34 UTC
  • mfrom: (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20101117201334-o4dp7uq437to7oxb
Tags: 0.5.1-1
[ Julien Jorge ]
* New upstream release (Closes: #565062, #546514).
* Add armhf architecture (Closes: #604689).
* Remove patches integrated upstream: rpath-editors.diff, rpath-game.diff,
  editors-menu-section.diff.
* Bump the Standard-Version, no changes.
* Update my email address.
* Set build dependency of libclaw to 1.6.0.
* Add the missing ${misc:Depends} in debian/control.
* List gettext translations in bear-factory.install and plee-the-bear.install.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
  Plee the Bear
3
3
 
4
 
  Copyright (C) 2005-2009 Julien Jorge, Sebastien Angibaud
 
4
  Copyright (C) 2005-2010 Julien Jorge, Sebastien Angibaud
5
5
 
6
6
  This program is free software; you can redistribute it and/or modify it
7
7
  under the terms of the GNU General Public License as published by the
48
48
      {
49
49
        player_1_monster = 0,
50
50
        player_2_monster,
 
51
        player_3_monster,
51
52
        enemy_monster,
52
53
        stone_1_monster,
53
54
        stone_2_monster,
 
55
        stone_3_monster,
54
56
        nature_monster
55
57
      }; // enum monster_type
56
58
 
70
72
    monster();
71
73
    virtual ~monster();
72
74
 
73
 
    bool receive_an_attack( monster& attacker, 
 
75
    bool receive_an_attack( monster& attacker,
74
76
                            const bear::universe::collision_info& info );
75
 
    
 
77
 
76
78
    virtual void set_invincible(const bool invincible);
77
79
    bool is_invincible() const;
78
80
    void set_offensive_phase(const bool offensive_phase);
79
81
    bool get_offensive_phase() const;
80
82
    void set_defensive_power(const attack_type index, const bool statut);
 
83
    bool get_defensive_power(const attack_type index) const;
81
84
    void set_offensive_coefficient
82
85
    (const attack_type index, const unsigned int coef);
83
86
 
85
88
    void set_monster_type(monster_type m);
86
89
    double get_energy() const;
87
90
    void set_energy(double energy);
 
91
    double get_initial_energy() const;
 
92
    bool is_injured() const;
88
93
 
89
94
    bool is_in_offensive_phase() const;
90
 
    
 
95
 
91
96
  protected:
92
97
    void to_string( std::string& str ) const;
93
98
 
94
99
  private:
95
100
    virtual void remove_energy(const monster& attacker, double energy );
96
 
  
 
101
 
97
102
  protected:
98
103
    bool is_vulnerable
99
104
    ( monster& attacker, const bear::universe::collision_info& info ) const;
100
105
    virtual void injure(const monster& attacker,
101
106
                        const bear::universe::collision_info& info);
102
107
    virtual void finish_injure();
103
 
    virtual void has_attacked();
 
108
    virtual void has_attacked(const monster& other);
104
109
    virtual bool get_defensive_power
105
110
    ( unsigned int index, const monster& attacker,
106
111
      const bear::universe::collision_info& info ) const;
108
113
    ( unsigned int index,
109
114
      const monster& attacker,
110
115
      const bear::universe::collision_info& info ) const;
111
 
    
 
116
 
112
117
  protected:
113
118
    /** \brief Force of attack. */
114
119
    unsigned int m_offensive_force;
116
121
    /** \brief Remaining energy of the monster. */
117
122
    double m_energy;
118
123
 
 
124
    /** \brief The initial energy of the monster. */
 
125
    double m_initial_energy;
 
126
 
119
127
    /** \brief Indicate if the monster is in an offensive phase. */
120
128
    bool m_offensive_phase;
121
129