Changeset 549:b7f912705adb


Ignore:
Timestamp:
04/09/11 23:14:14 (12 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Phase:
public
Message:

Fishmonger now mongers fish.

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • data/game.json

    r546 r549  
    2020        "fire_started_on_road": false,
    2121        "cannon_destroyed": false,
     22        "fishmonger_demons_killed": 0,
    2223        "all_fishmonger_demons_dead": false,
    2324        "kanedas_agreement_disrupted": false,
  • data/levels/fishmonger_house.json

    r498 r549  
    2222    ],
    2323    "enemies": [
    24         {"type": "PatrollingOni", "pos": [2, 7], "direction": "right" },
    25         {"type": "PatrollingOni", "pos": [45, 7], "direction": "right" },
    26         {"type": "PatrollingOni", "pos": [37, 10], "direction": "left" },
    27         {"type": "FlyingOni", "pos": [8, 2], "direction": "left" },
    28         {"type": "FlyingOni", "pos": [20, 2], "direction": "right" },
    29         {"type": "FlyingOni", "pos": [27, 2], "direction": "left" },
    30         {"type": "FlyingOni", "pos": [39, 2], "direction": "right" },
    31         {"type": "RedOni", "pos": [6, 5], "direction": "left" },
    32         {"type": "RedOni", "pos": [5, 9], "direction": "right" },
    33         {"type": "RedOni", "pos": [14, 3], "direction": "left" },
    34         {"type": "RedOni", "pos": [15, 7], "direction": "right" },
    35         {"type": "RedOni", "pos": [33, 3], "direction": "left" },
    36         {"type": "RedOni", "pos": [32, 7], "direction": "right" },
    37         {"type": "RedOni", "pos": [41, 5], "direction": "left" },
    38         {"type": "RedOni", "pos": [42, 9], "direction": "right" }
     24        {"type": "PatrollingOni", "pos": [2, 7], "direction": "right", "fishmonger_count": true },
     25        {"type": "PatrollingOni", "pos": [45, 7], "direction": "right", "fishmonger_count": true },
     26        {"type": "PatrollingOni", "pos": [37, 10], "direction": "left", "fishmonger_count": true },
     27        {"type": "FlyingOni", "pos": [8, 2], "direction": "left", "fishmonger_count": true },
     28        {"type": "FlyingOni", "pos": [20, 2], "direction": "right", "fishmonger_count": true },
     29        {"type": "FlyingOni", "pos": [27, 2], "direction": "left", "fishmonger_count": true },
     30        {"type": "FlyingOni", "pos": [39, 2], "direction": "right", "fishmonger_count": true },
     31        {"type": "RedOni", "pos": [6, 5], "direction": "left", "fishmonger_count": true },
     32        {"type": "RedOni", "pos": [5, 9], "direction": "right", "fishmonger_count": true },
     33        {"type": "RedOni", "pos": [14, 3], "direction": "left", "fishmonger_count": true },
     34        {"type": "RedOni", "pos": [15, 7], "direction": "right", "fishmonger_count": true },
     35        {"type": "RedOni", "pos": [33, 3], "direction": "left", "fishmonger_count": true },
     36        {"type": "RedOni", "pos": [32, 7], "direction": "right", "fishmonger_count": true },
     37        {"type": "RedOni", "pos": [41, 5], "direction": "left", "fishmonger_count": true },
     38        {"type": "RedOni", "pos": [42, 9], "direction": "right", "fishmonger_count": true }
    3939    ],
    4040    "doorways": {
  • data/npcs/fishmonger.json

    r297 r549  
    11{
    22    "start" : {
     3        "text": "Help! I am beset by demons!",
    34        "events" : [
    4             { "matches" : "world.missions.all_fishmonger_demons_dead", "next": "state.saved" }
     5            { "matches" : "world.missions.fishmonger_demons_killed >= 15", "next": "state.saved" }
    56        ]
    67    },
    78    "saved" : {
     9        "on_entry": "world.missions.all_fishmonger_demons_dead = True",
    810        "text" : "Thank the deities, I am saved! If you ever need some fish, my fox friend, I’m your man.",
    911        "auto_next": "state.salmon"
     
    1416    },
    1517    "happy" : {
     18        "on_entry": "drop_item('salmon')"
    1619    }
    1720}
  • skaapsteker/levelscene.py

    r523 r549  
    1414from . import constants
    1515from . import data
    16 from .sprites import player
     16from .sprites import player, base
    1717from .widgets.text import Text
    1818from .widgets.bubble import DialogueWidget, NotificationWidget
     
    5959
    6060        for sprite in self._level.sprites:
     61            # XXX: NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!
     62            if isinstance(sprite, base.Monster):
     63                sprite.world = game_state.world
    6164            self._world.add(sprite)
    6265        npcs_and_items = game_state.create_sprites(self._level.name)
  • skaapsteker/sprites/base.py

    r538 r549  
    160160        self.setup(**opts)
    161161
     162    def setup(self, fishmonger_count=False):
     163        self.fishmonger_count = fishmonger_count
     164
    162165    def collided_player(self, player):
    163166        self.start_attack(player)
     
    213216            AddSpriteEvent.post(Skeleton(self.rect.midbottom))
    214217            self.kill()
     218            if self.fishmonger_count:
     219                self.world.missions.fishmonger_demons_killed += 1
    215220
    216221class PatrollingMonster(Monster):
     
    277282    def setup(self, name, world, dsm, state, facing=None):
    278283        self.name = name
     284        self.world = world
    279285        self.dsm = dialogue.DSM(name, world, dsm, state)
    280286        self._me = getattr(world.npcs, self.name)
  • skaapsteker/sprites/enemies.py

    r425 r549  
    1717                }
    1818
    19     def setup(self, direction):
     19    def setup(self, direction, **opts):
     20        super(RedOni, self).setup(**opts)
    2021        self.facing = direction
    2122
     
    4445    patrol_velocity = (0, 200)
    4546
    46     def setup(self, direction):
    47         PatrollingOni.setup(self, direction)
     47    def setup(self, **opts):
     48        super(PatrollingOni, self).setup(**opts)
    4849        self.heading = 'up'
    4950
  • skaapsteker/sprites/npcs.py

    r546 r549  
    9797    ]
    9898
     99    def setup(self, **opts):
     100        super(FishMonger, self).setup(**opts)
     101        self.world.missions.fishmonger_demons_killed = 0
     102
    99103
    100104class Maneki(NPC):
Note: See TracChangeset for help on using the changeset viewer.