[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[adonthell-wastesedge-commits] Release_0-3-1 6087908 137/237: ADDED Bjar
From: |
Kai Sterker |
Subject: |
[adonthell-wastesedge-commits] Release_0-3-1 6087908 137/237: ADDED Bjarn's schedule |
Date: |
Mon, 25 Jul 2016 18:15:06 +0000 (UTC) |
tag: Release_0-3-1
commit 6087908ab5d33a6a5f042e0967ce66755d227529
Author: adondev <adondev>
Commit: adondev <adondev>
ADDED Bjarn's schedule
---
scripts/init.py | 1 +
scripts/schedules/mapcharacters/Makefile.am | 3 +-
scripts/schedules/mapcharacters/bjarn.py | 79 +++++++++++++++++++++++++++
3 files changed, 82 insertions(+), 1 deletion(-)
diff --git a/scripts/init.py b/scripts/init.py
index 4101492..2a822c9 100755
--- a/scripts/init.py
+++ b/scripts/init.py
@@ -985,6 +985,7 @@ class title_screen:
bjarn.jump_to (7, 3, 6)
bjarn.set_action ("talk")
bjarn.stand_west ()
+ bjarn.set_schedule ("bjarn")
bjarn.set_portrait ("bjarn.pnm")
silverhair = gamedata_get_character ("Imoen Silverhair")
diff --git a/scripts/schedules/mapcharacters/Makefile.am
b/scripts/schedules/mapcharacters/Makefile.am
index d7ae1d2..82e7a0c 100644
--- a/scripts/schedules/mapcharacters/Makefile.am
+++ b/scripts/schedules/mapcharacters/Makefile.am
@@ -2,6 +2,7 @@ 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 lucia.py intro.py
+ talan.py tristan.py fellnir.py to_cellar.py lucia.py intro.py \
+ bjarn.py
EXTRA_DIST = $(pkgdata_DATA)
diff --git a/scripts/schedules/mapcharacters/bjarn.py
b/scripts/schedules/mapcharacters/bjarn.py
new file mode 100644
index 0000000..4e0ce91
--- /dev/null
+++ b/scripts/schedules/mapcharacters/bjarn.py
@@ -0,0 +1,79 @@
+#
+# (C) Copyright 2001 Kai Sterker <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 Bjarn Fingolson
+#
+# He'll busy himself in his room
+
+import adonthell
+import random
+
+class bjarn:
+
+ def __init__ (self, mapcharacterinstance):
+ self.myself = mapcharacterinstance
+ self.speech = ["Ha! A tradesman is an honourable person, they say!", \
+ "Why don't they just take that Silverhair woman to
prison!?", \
+ "Elves! Their heads in the sky and their minds full of
clouds!"]
+
+ self.coords = [(7, 5, adonthell.STAND_WEST), \
+ (2, 4, adonthell.STAND_SOUTH), \
+ (7, 3, adonthell.STAND_NORTH), \
+ (3, 6, adonthell.STAND_WEST)]
+
+ def run (self):
+ myself = self.myself
+
+ # -- Get at the proper place when Erek lets the player into the room
+ # and at the end of the game.
+ if adonthell.gamedata_get_quest ("demo").get_val("the_end") == 1 or \
+ adonthell.gamedata_get_quest ("demo").get_val("bjarn_door_open") ==
2:
+ myself.jump_to (myself.submap (), 3, 6)
+ myself.stand_west ()
+ myself.set_val ("delay", 150)
+ return
+
+ 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[random.randint (0, 3)]
+
+ myself.set_goal (x, y, dir)
+ myself.set_val ("todo", 2)
+
+ # -- moving
+ elif todo == 2:
+ if myself.follow_path () == 1:
+ # -- the time we stay at the same place
+ delay = random.randint (30, 60) * 25
+
+ myself.set_val ("delay", delay)
+ 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[random.randint (0, 2)])
+ delay = random.randint (20, 40) * 40
+ myself.set_val ("say_something", delay)
- [adonthell-wastesedge-commits] Release_0-3-1 3bca664 054/237: Added new mapcharacters., (continued)
- [adonthell-wastesedge-commits] Release_0-3-1 3bca664 054/237: Added new mapcharacters., Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 ae421bc 146/237: Python scripts files are now compiled by the Adonthell binary., Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 3e84510 056/237: Forgot to update the Makefile, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 d6345fa 228/237: REMOVED audio schedule for the extro, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 bf5e61e 123/237: Took care of the case when the player takes Erek to Jelom and has not made it into Bjarn's room yet, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 1b6640a 151/237: MOVED engine control into seperate script, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 7ff9ee3 116/237: FIXED a few spelling errors, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 89d9191 037/237: Added Talan Wendth, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 31f9068 122/237: Schedule to get everybody down the cellar, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 ed1c142 160/237: FIXED Makefile.am's, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 6087908 137/237: ADDED Bjarn's schedule,
Kai Sterker <=
- [adonthell-wastesedge-commits] Release_0-3-1 69c9103 210/237: Fixed the extro a bit, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 79418df 227/237: ADDED Enter as alternative 'Action' key, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 4f1725f 119/237: FIXED erek and jelom, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 8fdfd66 165/237: Added Barn interior, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 48053be 090/237: Updated the init script, so you can skip the title sequence, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 547a59d 130/237: FIXED the mess I made ; P, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 b1a1e7a 154/237: ADDED extro dialogue, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 c31d284 145/237: MOVED fading code to mapengine, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 78eb33a 147/237: UPDATED scripts to make use of the new win_manager features, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 22057de 206/237: ADDED new music, Kai Sterker, 2016/07/25