-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
206 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from os import path | ||
|
||
from taleweave.systems.generic.logic import load_logic | ||
|
||
|
||
def logic_path(system: str) -> str: | ||
return path.join(".", "taleweave", "systems", "environment", system, "logic.yaml") | ||
|
||
|
||
SYSTEM_NAMES = [ | ||
"humidity", | ||
"temperature", | ||
"weather", | ||
] | ||
|
||
|
||
def init_logic(): | ||
systems = [] | ||
for system_name in SYSTEM_NAMES: | ||
logic_file = logic_path(system_name) | ||
if path.exists(logic_file): | ||
systems.append(load_logic(logic_file)) | ||
|
||
return systems |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
rules: | ||
# wet/dry logic | ||
- group: environment-moisture | ||
match: | ||
type: character | ||
wet: true | ||
chance: 0.1 | ||
set: | ||
wet: false | ||
|
||
- group: environment-moisture | ||
match: | ||
type: character | ||
wet: true | ||
temperature: hot | ||
chance: 0.2 | ||
set: | ||
wet: false | ||
|
||
- group: environment-temperature | ||
match: | ||
type: room | ||
temperature: hot | ||
chance: 0.2 | ||
trigger: [taleweave.systems.sim.environment_triggers:hot_room] | ||
|
||
- group: environment-temperature | ||
match: | ||
type: room | ||
temperature: cold | ||
chance: 0.2 | ||
trigger: [taleweave.systems.sim.environment_triggers:cold_room] | ||
|
||
labels: | ||
- match: | ||
type: character | ||
wet: true | ||
backstory: You are soaking wet. | ||
description: They are soaking wet and dripping water. | ||
# false intentionally omitted |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,51 @@ | ||
from .crafting_actions import action_craft | ||
from .language_actions import action_read | ||
from .magic_actions import action_cast | ||
from .movement_actions import action_climb | ||
from os import path | ||
|
||
from taleweave.systems.generic.logic import load_logic | ||
|
||
from .crafting.actions import action_craft | ||
from .magic.actions import action_cast | ||
from .movement.actions import action_climb | ||
from .quest.actions import accept_quest, submit_quest | ||
from .writing.actions import action_read, action_write | ||
|
||
|
||
def logic_path(system: str) -> str: | ||
return path.join(".", "taleweave", "systems", "rpg", system, "logic.yaml") | ||
|
||
|
||
SYSTEM_NAMES = [ | ||
"combat", | ||
"crafting", | ||
"health", | ||
"magic", | ||
"movement", | ||
"quest", | ||
"writing", | ||
] | ||
|
||
|
||
def init_actions(): | ||
return [ | ||
# crafting | ||
action_craft, | ||
# language | ||
action_read, | ||
# magic | ||
action_cast, | ||
# movement | ||
action_climb, | ||
# quest | ||
accept_quest, | ||
submit_quest, | ||
# writing | ||
action_read, | ||
action_write, | ||
] | ||
|
||
|
||
def init_logic(): | ||
return [] | ||
systems = [] | ||
for system_name in SYSTEM_NAMES: | ||
logic_file = logic_path(system_name) | ||
if path.exists(logic_file): | ||
systems.append(load_logic(logic_file, name_prefix=system_name)) | ||
|
||
return systems |
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
Empty file.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions
7
taleweave/actions/quest.py → taleweave/systems/rpg/quest/actions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.