Ignore:
Timestamp:
09/06/13 17:14:04 (9 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Phase:
public
Message:

Moonlight tiles force wolf form.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/protagonist.py

    r356 r357  
    7777        self.is_moving = False
    7878        self.changing_sequence = []
     79        self.change_delay = 0
    7980
    8081        self.go_human()
     
    253254
    254255    def toggle_form(self):
     256        if self.change_delay:
     257            return
    255258        self.changing_sequence.extend(self.CHANGING_SEQUENCE[self.form])
    256259
     
    344347
    345348    def update(self, dt):
     349        if self.change_delay > 0:
     350            self.change_delay -= 1
    346351        if self.changing_sequence:
    347352            self._go_to_next_form()
     
    350355                self.gain_health(1)
    351356        super(Protagonist, self).update(dt)
     357
     358    def force_wolf_form(self):
     359        if self.in_human_form() and not self.changing_sequence:
     360            self.toggle_form()
     361        self.change_delay = 2
Note: See TracChangeset for help on using the changeset viewer.