adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[adonthell-wastesedge-commits] Release_0-3-1 b40a92e 134/237: ADDED Luci


From: Kai Sterker
Subject: [adonthell-wastesedge-commits] Release_0-3-1 b40a92e 134/237: ADDED Lucia's schedule and furnitures
Date: Mon, 25 Jul 2016 18:15:06 +0000 (UTC)

tag: Release_0-3-1
commit b40a92e6ff55cd0c40fb7ba9cff09068af7ac0d7
Author: adondev <adondev>
Commit: adondev <adondev>

    ADDED Lucia's schedule and furnitures
    FIXED cellar teleport changed to non usuable for pathfinding.
---
 gfx/mapobjects/furnitures/stove.mobj        |  Bin 0 -> 2417 bytes
 maps/test.map                               |  Bin 2843 -> 2859 bytes
 scripts/init.py                             |  104 ++++++++++++++++++++++++++-
 scripts/schedules/mapcharacters/Makefile.am |    2 +-
 scripts/schedules/mapcharacters/lucia.py    |   79 ++++++++++++++++++++
 5 files changed, 183 insertions(+), 2 deletions(-)

diff --git a/gfx/mapobjects/furnitures/stove.mobj 
b/gfx/mapobjects/furnitures/stove.mobj
new file mode 100644
index 0000000..90054e7
Binary files /dev/null and b/gfx/mapobjects/furnitures/stove.mobj differ
diff --git a/maps/test.map b/maps/test.map
index cae6fa7..f2abe44 100755
Binary files a/maps/test.map and b/maps/test.map differ
diff --git a/scripts/init.py b/scripts/init.py
index 650cfac..4101492 100755
--- a/scripts/init.py
+++ b/scripts/init.py
@@ -789,6 +789,107 @@ class title_screen:
                                            "I'd better not touch this... What 
if it explodes??"))
         lm.add_event (ev)
 
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 0
+        ev.x = 6
+        ev.y = 17
+        ev.dir = STAND_WEST
+        ev.set_script ("character_speak", (the_player.get_name (), \
+                                           "Closed. We are all emprisonned 
here..."))
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 0
+        ev.x = 6
+        ev.y = 18
+        ev.dir = STAND_WEST
+        ev.set_script ("character_speak", (the_player.get_name (), \
+                                           "Closed. We are all emprisonned 
here..."))
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 0
+        ev.x = 6
+        ev.y = 19
+        ev.dir = STAND_WEST
+        ev.set_script ("character_speak", (the_player.get_name (), \
+                                           "Closed. We are all emprisonned 
here..."))
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 17
+        ev.x = 1
+        ev.y = 6
+        ev.dir = STAND_NORTH
+        ev.set_script ("character_speak", (the_player.get_name (), \
+                                           "It's locked."))
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 19
+        ev.x = 2
+        ev.y = 5
+        ev.dir = STAND_NORTH
+        ev.set_script ("character_speak", (the_player.get_name (), \
+                                           "It's locked."))
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 19
+        ev.x = 6
+        ev.y = 4
+        ev.dir = STAND_NORTH
+        ev.set_script ("character_speak", (the_player.get_name (), \
+                                           "It's locked."))
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 19
+        ev.x = 6
+        ev.y = 8
+        ev.dir = STAND_NORTH
+        ev.set_script ("character_speak", (the_player.get_name (), \
+                                           "It's locked."))
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 6
+        ev.x = 1
+        ev.y = 4
+        ev.dir = STAND_NORTH
+        ev.set_script ("character_speak", (the_player.get_name (), \
+                                           "It's locked."))
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 7
+        ev.x = 7
+        ev.y = 3
+        ev.dir = STAND_NORTH
+        ev.set_script ("character_speak", (the_player.get_name (), \
+                                           "I doubt Master Fingolson would be 
happy if I go through his things..."))
+        lm.add_event (ev)
+
+        ev = action_event ()
+        ev.thisown = C
+        ev.submap = 13
+        ev.x = 1
+        ev.y = 6
+        ev.dir = STAND_NORTH
+        ev.set_script ("character_speak", (the_player.get_name (), \
+                                           "Well, I can't dig into my 
mistress' shelf!"))
+        lm.add_event (ev)
+
+
         # Now setup the characters
         player = gamedata_player ()
         player.jump_to (0, 4, 18)
@@ -799,8 +900,9 @@ class title_screen:
         lucia.set_dialogue ("dialogues/lucia_start")
         lucia.load ("lucia.mchar")
         lucia.set_map (gamedata_map_engine ().get_landmap ())
-        lucia.jump_to (3, 4, 2)
+        lucia.jump_to (3, 4, 3)
         lucia.set_action ("talk")
+        lucia.set_schedule ("lucia")
         lucia.stand_south ()
         lucia.set_portrait ("lucia.pnm")
 
diff --git a/scripts/schedules/mapcharacters/Makefile.am 
b/scripts/schedules/mapcharacters/Makefile.am
index 31ffbdd..fb4efa9 100644
--- a/scripts/schedules/mapcharacters/Makefile.am
+++ b/scripts/schedules/mapcharacters/Makefile.am
@@ -2,6 +2,6 @@ pkgdatadir = $(gamedatadir)/scripts/schedules/mapcharacters
 
 pkgdata_DATA = alek.py erek.py frostbloom.py janesta.py jelom.py \
        keyboard_control.py oliver.py orloth.py sarin.py silverhair.py \
-       talan.py tristan.py fellnir.py to_cellar.py
+       talan.py tristan.py fellnir.py to_cellar.py lucia.py
 
 EXTRA_DIST = $(pkgdata_DATA)
diff --git a/scripts/schedules/mapcharacters/lucia.py 
b/scripts/schedules/mapcharacters/lucia.py
new file mode 100644
index 0000000..dc10fc0
--- /dev/null
+++ b/scripts/schedules/mapcharacters/lucia.py
@@ -0,0 +1,79 @@
+#
+#  (C) Copyright 2001 Alexandre Courbot <address@hidden>
+#  Part of the Adonthell Project http://adonthell.linuxgames.com
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License.
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY.
+#
+#  See the COPYING file for more details
+#
+
+# -- Movement schedule for Lucia Redwyne
+#
+# She just walk around in the kitchen, doing her business and
+# complaining about her life.
+
+import adonthell
+from adonthell import STAND_NORTH, STAND_SOUTH, STAND_WEST, STAND_EAST
+from random import randint
+
+class lucia:
+
+    def __init__ (self, mapcharacterinstance):
+        self.myself = mapcharacterinstance
+        
+        self.speech = ["When could I finally rest a bit?", \
+                       "I told Orloth this place would bring us problems!", \
+                       "This smoke! I'm dying!"]
+
+        self.coords = [(3, 3, STAND_NORTH), \
+                  (6, 3, STAND_EAST)]
+
+    def run (self):
+        myself = self.myself
+        todo = myself.get_val ("todo")
+
+        # -- waiting
+        if todo == 0:
+            delay = myself.get_val ("delay")
+
+            # -- If standing delay expired, move around next time
+            if delay == 0:
+                myself.set_val ("todo", 1)
+            else:
+                myself.set_val ("delay", delay - 1)
+
+
+        # -- engage a new movement
+        elif todo == 1:
+            x, y, dir = self.coords[randint(0, 1)]
+            myself.set_goal (x, y, dir)
+            myself.set_val ("todo", 2)
+
+        # -- moving
+        elif todo == 2:
+            if myself.follow_path () == 1:
+                # -- standing in front of the exit
+                if myself.posx () == 6:
+                    myself.speak ("Ah, some fresh air!")
+
+                    tmp = myself.get_val ("say_something")
+                    myself.set_val ("say_something", tmp + 75)
+                    myself.set_val ("delay", 300)
+
+                else:
+                    myself.set_val ("delay", 1000 + randint (0, 2000))
+                                    
+                myself.set_val ("todo", 0)
+
+
+
+        # -- utter a random remark
+        tmp = myself.get_val ("say_something")
+        myself.set_val ("say_something", tmp - 1)
+        if tmp == 0:
+            myself.speak (self.speech[randint (0, 2)])
+            delay = randint (50, 100) * 20
+            myself.set_val ("say_something", delay)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]