Compare commits
37 Commits
image-sync
...
master
Author | SHA1 | Date | |
---|---|---|---|
5312e322f0 | |||
f2a5a74ca8 | |||
02d36190c2 | |||
03cb4609eb | |||
7c454b41c2 | |||
981712c32b | |||
6bfb07dba9 | |||
dd23cd83d5 | |||
3da183fe80 | |||
a9d376b36c | |||
29a8d52f0f | |||
6815aa9158 | |||
8a1d90d06f | |||
014eba5937 | |||
7772524569 | |||
5feee250e4 | |||
1be8c6ba58 | |||
edfe4740b8 | |||
63c68c7232 | |||
dd5bf4cb33 | |||
dbbbd22483 | |||
be5f3fe2da | |||
7d8d183bf4 | |||
a9f96e335f | |||
66526fb8da | |||
67be117367 | |||
7c8c897d60 | |||
40ab1d0000 | |||
62756bf703 | |||
bd1257de86 | |||
d004a7ec55 | |||
be75aaea9f | |||
3f0ba1a605 | |||
4aaec17473 | |||
b3604a0700 | |||
f5edec4708 | |||
9f8556bfa3 |
5
BaselineOfRoloLudo.package/.filetree
Normal file
5
BaselineOfRoloLudo.package/.filetree
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"separateMethodMetaAndSource" : false,
|
||||
"noMethodMetaData" : true,
|
||||
"useCypressPropertiesFile" : true
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
baselines
|
||||
baseline: spec
|
||||
<baseline>
|
||||
spec
|
||||
for: #common
|
||||
do: [
|
||||
spec package: 'RoloLudo'
|
||||
]
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
projectClass
|
||||
^ MetacelloCypressBaselineProject
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"commentStamp" : "",
|
||||
"super" : "BaselineOf",
|
||||
"category" : "BaselineOfRoloLudo",
|
||||
"classinstvars" : [ ],
|
||||
"pools" : [ ],
|
||||
"classvars" : [ ],
|
||||
"instvars" : [ ],
|
||||
"name" : "BaselineOfRoloLudo",
|
||||
"type" : "normal"
|
||||
}
|
1
BaselineOfRoloLudo.package/monticello.meta/categories.st
Normal file
1
BaselineOfRoloLudo.package/monticello.meta/categories.st
Normal file
@ -0,0 +1 @@
|
||||
SystemOrganization addCategory: #BaselineOfRoloLudo!
|
1
BaselineOfRoloLudo.package/monticello.meta/package
Normal file
1
BaselineOfRoloLudo.package/monticello.meta/package
Normal file
@ -0,0 +1 @@
|
||||
(name 'BaselineOfRoloLudo')
|
1
BaselineOfRoloLudo.package/properties.json
Normal file
1
BaselineOfRoloLudo.package/properties.json
Normal file
@ -0,0 +1 @@
|
||||
{ }
|
27
README.md
27
README.md
@ -1,3 +1,28 @@
|
||||
# RoloLudo
|
||||
|
||||
Utilities for table top role playing, starting with Ironsworn.
|
||||
Utilities for table top role playing, starting with [Ironsworn](https://www.ironswornrpg.com/),
|
||||
[Starforged](https://www.ironswornrpg.com/product-ironsworn-starforged)
|
||||
and [Firelights](https://firelights.farirpgs.com/).
|
||||
|
||||
To install it on Pharo/GToolkit first install [ExoRepo](https://code.tupale.co/Offray/ExoRepo)
|
||||
and then run from a Playground:
|
||||
|
||||
```smalltalk
|
||||
ExoRepo new
|
||||
repository: 'https://code.sustrato.red/Offray/RoloLudo';
|
||||
load.
|
||||
```
|
||||
|
||||
The first utilities connect JSON oracles with the [502Lab wiki](https://mutabit.com/repos.fossil/502Lab/uv/wiki/502Lab.html#) to facilitate translations.
|
||||
In the future it is expected to incorporate different utilities to make the game experience more fluid and minimalistic:
|
||||
|
||||
* [x] Virtual dice.
|
||||
* [x] Querying of oracles and wiki.
|
||||
* [ ] Bots connected to Telegram or other game channels.
|
||||
* [ ] Querying and editing of character sheets.
|
||||
|
||||
**References**:
|
||||
|
||||
* [Dataforged](https://github.com/rsek/dataforged): Official Ironsworn: Starforged rules data in JSON, for use in community tools.
|
||||
* [Datasworn](https://github.com/rsek/datasworn): JSON files of game data for the tabletop role-playing game Ironsworn, and its expansion, Ironsworn: Delve. For use in community-created tools, since it doesn't make sense to duplicate work on data entry.
|
||||
* [Stargazer conversions](https://github.com/nboughton/stargazer_conversions): This project provides scripts to convert JSON content forged with rsek data to match the models used in the Stargazer project.
|
1
RoloLudo.package/DeckOfCards.class/README.md
Normal file
1
RoloLudo.package/DeckOfCards.class/README.md
Normal file
@ -0,0 +1 @@
|
||||
I represent a deck of cards. The terminology was taken from [Glossary of card game terms](https://en.wikipedia.org/wiki/Glossary_of_card_game_terms) in Wikipedia.
|
10
RoloLudo.package/DeckOfCards.class/class/cards.st
Normal file
10
RoloLudo.package/DeckOfCards.class/class/cards.st
Normal file
@ -0,0 +1,10 @@
|
||||
accessing
|
||||
cards
|
||||
| response |
|
||||
response := OrderedCollection new.
|
||||
self suits keysDo: [:suit |
|
||||
(self numeralCards, self faceCards) do: [:number|
|
||||
response add: number asString, suit.
|
||||
].
|
||||
].
|
||||
^ response
|
3
RoloLudo.package/DeckOfCards.class/class/faceCards.st
Normal file
3
RoloLudo.package/DeckOfCards.class/class/faceCards.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
faceCards
|
||||
^ #( 'J' 'Q' 'K')
|
3
RoloLudo.package/DeckOfCards.class/class/numeralCards.st
Normal file
3
RoloLudo.package/DeckOfCards.class/class/numeralCards.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
numeralCards
|
||||
^ 1 to: 10
|
6
RoloLudo.package/DeckOfCards.class/class/suits.st
Normal file
6
RoloLudo.package/DeckOfCards.class/class/suits.st
Normal file
@ -0,0 +1,6 @@
|
||||
accessing
|
||||
suits
|
||||
^ { '♣' -> 'clubs' .
|
||||
'♦' -> 'diamons' .
|
||||
'♥' ->'hearts' .
|
||||
'♠' ->'spades'} asDictionary
|
3
RoloLudo.package/DeckOfCards.class/instance/cards.st
Normal file
3
RoloLudo.package/DeckOfCards.class/instance/cards.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
cards
|
||||
^ self class cards
|
6
RoloLudo.package/DeckOfCards.class/instance/draw..st
Normal file
6
RoloLudo.package/DeckOfCards.class/instance/draw..st
Normal file
@ -0,0 +1,6 @@
|
||||
accessing
|
||||
draw: card
|
||||
self stock
|
||||
detect: [ :each | each = card ]
|
||||
ifFound: [self drawn add: card ]
|
||||
ifNone: [ ^ nil ]
|
6
RoloLudo.package/DeckOfCards.class/instance/draw.st
Normal file
6
RoloLudo.package/DeckOfCards.class/instance/draw.st
Normal file
@ -0,0 +1,6 @@
|
||||
accessing
|
||||
draw
|
||||
| taken |
|
||||
taken := self stock atRandom.
|
||||
self drawn add: taken.
|
||||
^ taken
|
3
RoloLudo.package/DeckOfCards.class/instance/drawAll..st
Normal file
3
RoloLudo.package/DeckOfCards.class/instance/drawAll..st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
drawAll: aCollection
|
||||
self drawn addAll: aCollection
|
3
RoloLudo.package/DeckOfCards.class/instance/drawn..st
Normal file
3
RoloLudo.package/DeckOfCards.class/instance/drawn..st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
drawn: aCollection
|
||||
drawn := aCollection
|
3
RoloLudo.package/DeckOfCards.class/instance/drawn.st
Normal file
3
RoloLudo.package/DeckOfCards.class/instance/drawn.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
drawn
|
||||
^ drawn ifNil: [drawn := OrderedCollection new]
|
12
RoloLudo.package/DeckOfCards.class/instance/printOn..st
Normal file
12
RoloLudo.package/DeckOfCards.class/instance/printOn..st
Normal file
@ -0,0 +1,12 @@
|
||||
accessing
|
||||
printOn: aStream
|
||||
super initialize.
|
||||
aStream nextPutAll: 'Stock: ', String cr.
|
||||
self class suits keysDo: [ :suit |
|
||||
aStream
|
||||
nextPutAll: (self stockCardsInSuit: suit);
|
||||
nextPutAll: String cr.
|
||||
].
|
||||
aStream nextPutAll: 'Drawn: ', String cr.
|
||||
self drawn do: [:card | aStream nextPutAll: card, ' ' ].
|
||||
^ aStream contents.
|
5
RoloLudo.package/DeckOfCards.class/instance/reset.st
Normal file
5
RoloLudo.package/DeckOfCards.class/instance/reset.st
Normal file
@ -0,0 +1,5 @@
|
||||
accessing
|
||||
reset
|
||||
self drawn: OrderedCollection new.
|
||||
self stock: self class cards.
|
||||
^ self
|
3
RoloLudo.package/DeckOfCards.class/instance/stock.st
Normal file
3
RoloLudo.package/DeckOfCards.class/instance/stock.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
stock
|
||||
^ stock := self class cards copyWithoutAll: self drawn
|
@ -0,0 +1,7 @@
|
||||
accessing
|
||||
stockCardsInSuit: aString
|
||||
| response suitCards |
|
||||
response := '' writeStream.
|
||||
suitCards := self stock select: [ :card | card endsWith: aString ].
|
||||
suitCards do: [ :card | response nextPutAll: card ].
|
||||
^ response contents
|
@ -0,0 +1,6 @@
|
||||
accessing
|
||||
uiCardsFor: aView
|
||||
<gtView>
|
||||
^ aView text
|
||||
title: 'Cards';
|
||||
text: [ self printString ]
|
@ -1,13 +1,14 @@
|
||||
{
|
||||
"commentStamp" : "GlamorousAuthor 5/17/2021 16:41",
|
||||
"commentStamp" : "<historical>",
|
||||
"super" : "Object",
|
||||
"category" : "RoloLudo",
|
||||
"classinstvars" : [ ],
|
||||
"pools" : [ ],
|
||||
"classvars" : [ ],
|
||||
"instvars" : [
|
||||
"items"
|
||||
"drawn",
|
||||
"stock"
|
||||
],
|
||||
"name" : "SfAssets",
|
||||
"name" : "DeckOfCards",
|
||||
"type" : "normal"
|
||||
}
|
0
RoloLudo.package/DicePool.class/README.md
Normal file
0
RoloLudo.package/DicePool.class/README.md
Normal file
3
RoloLudo.package/DicePool.class/instance/dice..st
Normal file
3
RoloLudo.package/DicePool.class/instance/dice..st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
dice: anArray
|
||||
dice := anArray
|
3
RoloLudo.package/DicePool.class/instance/dice.st
Normal file
3
RoloLudo.package/DicePool.class/instance/dice.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
dice
|
||||
^ dice ifNil: [dice := Array new ]
|
5
RoloLudo.package/DicePool.class/instance/printOn..st
Normal file
5
RoloLudo.package/DicePool.class/instance/printOn..st
Normal file
@ -0,0 +1,5 @@
|
||||
accessing
|
||||
printOn: aStream
|
||||
super initialize.
|
||||
aStream
|
||||
nextPutAll: self dice printString
|
3
RoloLudo.package/DicePool.class/instance/roll.st
Normal file
3
RoloLudo.package/DicePool.class/instance/roll.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
roll
|
||||
^ self dice collect: [:each | each roll ]
|
14
RoloLudo.package/DicePool.class/instance/uiDiceFor..st
Normal file
14
RoloLudo.package/DicePool.class/instance/uiDiceFor..st
Normal file
@ -0,0 +1,14 @@
|
||||
accessing
|
||||
uiDiceFor: aView
|
||||
<gtView>
|
||||
| response currentRoll dicePool |
|
||||
response := '' writeStream.
|
||||
currentRoll := self roll.
|
||||
dicePool := self dice collect: [:each | each faces ].
|
||||
response
|
||||
nextPutAll: 'Dice: ', dicePool printString ; cr;
|
||||
nextPutAll: 'Roll: ', currentRoll printString; cr;
|
||||
nextPutAll: 'Sum: ', currentRoll sum asString.
|
||||
^ aView text
|
||||
title: 'Dice';
|
||||
text: [ response contents ]
|
4
RoloLudo.package/DicePool.class/instance/with.with..st
Normal file
4
RoloLudo.package/DicePool.class/instance/with.with..st
Normal file
@ -0,0 +1,4 @@
|
||||
accessing
|
||||
with: fistInteger with: secondInteger
|
||||
|
||||
self dice: (Array with: (Die with: fistInteger) with: (Die with: secondInteger))
|
13
RoloLudo.package/DicePool.class/properties.json
Normal file
13
RoloLudo.package/DicePool.class/properties.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"commentStamp" : "",
|
||||
"super" : "Object",
|
||||
"category" : "RoloLudo",
|
||||
"classinstvars" : [ ],
|
||||
"pools" : [ ],
|
||||
"classvars" : [ ],
|
||||
"instvars" : [
|
||||
"dice"
|
||||
],
|
||||
"name" : "DicePool",
|
||||
"type" : "normal"
|
||||
}
|
0
RoloLudo.package/Die.class/README.md
Normal file
0
RoloLudo.package/Die.class/README.md
Normal file
4
RoloLudo.package/Die.class/class/with..st
Normal file
4
RoloLudo.package/Die.class/class/with..st
Normal file
@ -0,0 +1,4 @@
|
||||
accessing
|
||||
with: anInteger
|
||||
^ self new
|
||||
faces: anInteger
|
3
RoloLudo.package/Die.class/instance/faces..st
Normal file
3
RoloLudo.package/Die.class/instance/faces..st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
faces: anInteger
|
||||
faces := anInteger
|
3
RoloLudo.package/Die.class/instance/faces.st
Normal file
3
RoloLudo.package/Die.class/instance/faces.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
faces
|
||||
^ faces
|
5
RoloLudo.package/Die.class/instance/printOn..st
Normal file
5
RoloLudo.package/Die.class/instance/printOn..st
Normal file
@ -0,0 +1,5 @@
|
||||
accessing
|
||||
printOn: aStream
|
||||
super initialize.
|
||||
aStream
|
||||
nextPutAll: self faces asString
|
3
RoloLudo.package/Die.class/instance/roll.st
Normal file
3
RoloLudo.package/Die.class/instance/roll.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
roll
|
||||
^ self faces atRandom
|
13
RoloLudo.package/Die.class/properties.json
Normal file
13
RoloLudo.package/Die.class/properties.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"commentStamp" : "",
|
||||
"super" : "Object",
|
||||
"category" : "RoloLudo",
|
||||
"classinstvars" : [ ],
|
||||
"pools" : [ ],
|
||||
"classvars" : [ ],
|
||||
"instvars" : [
|
||||
"faces"
|
||||
],
|
||||
"name" : "Die",
|
||||
"type" : "normal"
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
accessing
|
||||
approaches
|
||||
^ approaches ifNil: [
|
||||
approaches := OrderedDictionary new
|
||||
at: 'Strong' put: 0;
|
||||
at: 'Patient'put: 0;
|
||||
at: 'Quick' put: 0;
|
||||
yourself
|
||||
]
|
@ -0,0 +1,6 @@
|
||||
accessing
|
||||
inventory
|
||||
^ inventory ifNil: [
|
||||
inventory := Dictionary new
|
||||
at: 'vehicle' put: self vehicle;
|
||||
yourself]
|
@ -0,0 +1,3 @@
|
||||
as yet unclassified
|
||||
name: aString
|
||||
name := aString
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
name
|
||||
^ name
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
patient: anInteger
|
||||
self approaches at: 'Patient' put: anInteger
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
patient
|
||||
^ self approaches at: 'Patient'
|
@ -0,0 +1,10 @@
|
||||
accessing
|
||||
printOn: aStream
|
||||
super initialize.
|
||||
aStream
|
||||
nextPutAll: '- Name: ', self name; cr;
|
||||
nextPutAll: '- Pronouns: ', self pronouns; cr;
|
||||
nextPutAll: '- Approaches'; cr;
|
||||
nextPutAll: ' - Strong: ', self strong asString; cr;
|
||||
nextPutAll: ' - Patient: ', self patient asString; cr;
|
||||
nextPutAll: ' - Quick: ', self quick asString; cr
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
pronouns: aString
|
||||
pronouns := aString
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
pronouns
|
||||
^ pronouns
|
@ -0,0 +1,3 @@
|
||||
as yet unclassified
|
||||
quick: anInteger
|
||||
self approaches at: 'Quick' put: anInteger.
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
quick
|
||||
^ self approaches at: 'Quick'
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
relics
|
||||
^ self inventory at: 'relics' ifAbsentPut: [ nil ]
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
strong: anInteger
|
||||
self approaches at: 'Strong' put: anInteger
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
strong
|
||||
^ self approaches at: 'Strong'
|
@ -0,0 +1,6 @@
|
||||
accessing
|
||||
uiViewFor: aView
|
||||
<gtView>
|
||||
^ aView text
|
||||
title: 'Character Info';
|
||||
text: [ self printString ]
|
@ -0,0 +1,4 @@
|
||||
accessing
|
||||
vehicle
|
||||
"This should be replaced y a Vehicle inventory item, with fatigue status."
|
||||
^ 'criocápsula móvil'
|
16
RoloLudo.package/FirelightsCharacter.class/properties.json
Normal file
16
RoloLudo.package/FirelightsCharacter.class/properties.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"commentStamp" : "",
|
||||
"super" : "Object",
|
||||
"category" : "RoloLudo",
|
||||
"classinstvars" : [ ],
|
||||
"pools" : [ ],
|
||||
"classvars" : [ ],
|
||||
"instvars" : [
|
||||
"name",
|
||||
"pronouns",
|
||||
"inventory",
|
||||
"approaches"
|
||||
],
|
||||
"name" : "FirelightsCharacter",
|
||||
"type" : "normal"
|
||||
}
|
0
RoloLudo.package/FirelightsGame.class/README.md
Normal file
0
RoloLudo.package/FirelightsGame.class/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
characters
|
||||
^ characters ifNil: [ characters := OrderedCollection new]
|
3
RoloLudo.package/FirelightsGame.class/instance/deck..st
Normal file
3
RoloLudo.package/FirelightsGame.class/instance/deck..st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
deck: anObject
|
||||
deck := anObject
|
3
RoloLudo.package/FirelightsGame.class/instance/deck.st
Normal file
3
RoloLudo.package/FirelightsGame.class/instance/deck.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
deck
|
||||
^ deck ifNil: [ deck := DeckOfCards new]
|
3
RoloLudo.package/FirelightsGame.class/instance/dice.st
Normal file
3
RoloLudo.package/FirelightsGame.class/instance/dice.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
dice
|
||||
^ dice ifNil: [ dice := DicePool new with: 6 with: 6 ]
|
10
RoloLudo.package/FirelightsGame.class/instance/export.st
Normal file
10
RoloLudo.package/FirelightsGame.class/instance/export.st
Normal file
@ -0,0 +1,10 @@
|
||||
accessing
|
||||
export
|
||||
| response |
|
||||
response := '' writeStream.
|
||||
(STON writer on: response)
|
||||
newLine: String lf;
|
||||
prettyPrint: true;
|
||||
keepNewLines: true;
|
||||
nextPut: self.
|
||||
^ MarkupFile exportAsFileOn: FileLocator temp / 'firelights.ston' containing: (response contents)
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
loadOraclesFromRepository
|
||||
^ STON fromString: 'https://mutabit.com/repos.fossil/502Lab/raw/f0c299?at=oracles.ston' asUrl retrieveContents utf8Decoded
|
@ -0,0 +1,18 @@
|
||||
accessing
|
||||
loadOraclesFromWikiTemplate
|
||||
| oraclesTiddler rows |
|
||||
oraclesTiddler := self wiki templateWiki tiddlers
|
||||
detect: [:tiddler | (tiddler title) = 'Tablas Generadoras' ].
|
||||
rows := oraclesTiddler text lines allButFirst collect: [:each | each splitOn: '|'].
|
||||
^ rows collect: [:row | | tempDice |
|
||||
tempDice := (row second splitOn: '"') second.
|
||||
tempDice := tempDice splitOn: Character space.
|
||||
tempDice := { tempDice first asNumber . tempDice second asNumber }.
|
||||
OrderedDictionary new
|
||||
at: 'dice' put: tempDice;
|
||||
at: 'region' put: row third;
|
||||
at: 'theme' put: row fourth;
|
||||
at: 'event' put: row fifth;
|
||||
at: 'past' put: row sixth;
|
||||
yourself.
|
||||
]
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
namesOracle
|
||||
^ SfOracle new loadCharacterNames options
|
@ -0,0 +1,4 @@
|
||||
accessing
|
||||
newMainCharacter
|
||||
self characters ifEmpty: [ self characters add: FirelightsCharacter new].
|
||||
^ self characters first.
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
oracles: aDictionary
|
||||
oracles := aDictionary
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
oracles
|
||||
^ oracles ifNil: [ oracles := self loadOraclesFromRepository]
|
@ -0,0 +1,5 @@
|
||||
accessing
|
||||
queryOracles
|
||||
| currentRoll |
|
||||
currentRoll := self roll.
|
||||
^ self oracles detect: [ :each | (each at: 'dice') = currentRoll ] ifNone: [ ^ currentRoll ]
|
@ -0,0 +1,8 @@
|
||||
accessing
|
||||
randomName
|
||||
| response|
|
||||
response := self namesOracle.
|
||||
^ {'Given name' -> (response at: 'givenNames') atRandom.
|
||||
'callsign' -> (response at: 'callsigns') atRandom.
|
||||
'Familiy name' -> (response at: 'familyNames') atRandom.
|
||||
} asDictionary.
|
@ -0,0 +1,4 @@
|
||||
accessing
|
||||
resetWorlMap
|
||||
self worldMap: nil.
|
||||
self deck reset.
|
3
RoloLudo.package/FirelightsGame.class/instance/roll.st
Normal file
3
RoloLudo.package/FirelightsGame.class/instance/roll.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
roll
|
||||
^ self dice roll
|
@ -0,0 +1,11 @@
|
||||
accessing
|
||||
saveOracles
|
||||
| fileName formats |
|
||||
fileName := 'oracles'.
|
||||
formats := {'ston' -> STON. 'json' -> STONJSON} asDictionary.
|
||||
formats keysAndValuesDo: [:format :class |
|
||||
MarkupFile
|
||||
exportAsFileOn: (FileLocator temp / fileName), format
|
||||
containing: (class toStringPretty: self oracles)
|
||||
].
|
||||
^ FileLocator temp
|
3
RoloLudo.package/FirelightsGame.class/instance/story..st
Normal file
3
RoloLudo.package/FirelightsGame.class/instance/story..st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
story: anObject
|
||||
story := anObject
|
3
RoloLudo.package/FirelightsGame.class/instance/story.st
Normal file
3
RoloLudo.package/FirelightsGame.class/instance/story.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
story
|
||||
^ story ifNil: [ story := OrderedCollection new]
|
13
RoloLudo.package/FirelightsGame.class/instance/uiGameFor..st
Normal file
13
RoloLudo.package/FirelightsGame.class/instance/uiGameFor..st
Normal file
@ -0,0 +1,13 @@
|
||||
accessing
|
||||
uiGameFor: aView
|
||||
<gtView>
|
||||
| response |
|
||||
response := '' writeStream.
|
||||
response
|
||||
nextPutAll: '❭❭❭ Main Character'; cr; cr;
|
||||
nextPutAll: self characters first printString; cr;
|
||||
nextPutAll: '❭❭❭ Deck'; cr; cr;
|
||||
nextPutAll: self deck printString.
|
||||
^ aView text
|
||||
title: 'Game';
|
||||
text: [ response contents ]
|
7
RoloLudo.package/FirelightsGame.class/instance/wiki.st
Normal file
7
RoloLudo.package/FirelightsGame.class/instance/wiki.st
Normal file
@ -0,0 +1,7 @@
|
||||
accessing
|
||||
wiki
|
||||
|
||||
^ wiki ifNil: [ wiki := TiddlyWiki new
|
||||
name: 'Firelights/Vivarium games wiki';
|
||||
template: 'https://vivarium.tiddlyhost.com/'.
|
||||
]
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
worldMap: anObject
|
||||
wordMap := anObject
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
worldMap
|
||||
^ wordMap ifNil: [ wordMap := OrderedCollection new ]
|
@ -0,0 +1,5 @@
|
||||
accessing
|
||||
worldMapDraw: aCardCollection
|
||||
self deck drawn addAll: aCardCollection.
|
||||
self worldMap addAll: aCardCollection.
|
||||
|
@ -0,0 +1,6 @@
|
||||
accessing
|
||||
worldMapDraw
|
||||
| currentPlace |
|
||||
currentPlace := self deck draw.
|
||||
self worldMap add: currentPlace.
|
||||
^ currentPlace
|
19
RoloLudo.package/FirelightsGame.class/properties.json
Normal file
19
RoloLudo.package/FirelightsGame.class/properties.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"commentStamp" : "",
|
||||
"super" : "Object",
|
||||
"category" : "RoloLudo",
|
||||
"classinstvars" : [ ],
|
||||
"pools" : [ ],
|
||||
"classvars" : [ ],
|
||||
"instvars" : [
|
||||
"deck",
|
||||
"dice",
|
||||
"wordMap",
|
||||
"oracles",
|
||||
"wiki",
|
||||
"characters",
|
||||
"story"
|
||||
],
|
||||
"name" : "FirelightsGame",
|
||||
"type" : "normal"
|
||||
}
|
1
RoloLudo.package/LudoBot.class/README.md
Normal file
1
RoloLudo.package/LudoBot.class/README.md
Normal file
@ -0,0 +1 @@
|
||||
I model a simple bot to automatize some tasks related with rolling oracles, character creation and playin in general.
|
@ -0,0 +1,9 @@
|
||||
accessing
|
||||
newRandomPlayerCharacter
|
||||
^ SfPlayerCharacter new
|
||||
momentum: 2;
|
||||
maxMomentum: 10;
|
||||
momentumReset: 2;
|
||||
health: 5;
|
||||
spirit: 5;
|
||||
supply: 5.
|
11
RoloLudo.package/LudoBot.class/instance/rollDice.st
Normal file
11
RoloLudo.package/LudoBot.class/instance/rollDice.st
Normal file
@ -0,0 +1,11 @@
|
||||
accessing
|
||||
rollDice
|
||||
"For the moment, I will model a dice roll in Ironsworn Starforged.
|
||||
A more abstract vocabulary should be deviced allowing the roll of
|
||||
dice pool"
|
||||
|
||||
^ OrderedDictionary new
|
||||
at: 'challenge die (1):' put: 10 atRandom;
|
||||
at: 'action die:' put: 6 atRandom;
|
||||
at: 'challenge die (2):' put: 10 atRandom;
|
||||
yourself.
|
11
RoloLudo.package/LudoBot.class/properties.json
Normal file
11
RoloLudo.package/LudoBot.class/properties.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"commentStamp" : "<historical>",
|
||||
"super" : "Object",
|
||||
"category" : "RoloLudo",
|
||||
"classinstvars" : [ ],
|
||||
"pools" : [ ],
|
||||
"classvars" : [ ],
|
||||
"instvars" : [ ],
|
||||
"name" : "LudoBot",
|
||||
"type" : "normal"
|
||||
}
|
@ -2,5 +2,9 @@ I model an asset of the Ironsworn Starforged Tabletop Roleplaying Game.
|
||||
|
||||
More information at:
|
||||
|
||||
[1] https://www.ironswornrpg.com/
|
||||
[2] https://www.kickstarter.com/projects/shawntomkin/ironsworn-starforged
|
||||
[1] <https://www.ironswornrpg.com/>
|
||||
[2] <https://www.kickstarter.com/projects/shawntomkin/ironsworn-starforged>
|
||||
|
||||
I use as inspiration the data provided by @rsek at this repostory:
|
||||
|
||||
<https://github.com/rsek/datasworn>
|
@ -0,0 +1,9 @@
|
||||
accessing
|
||||
collectionFromRepository: jsonFileUrl language: isoCode
|
||||
| rawData |
|
||||
rawData := STON fromString: jsonFileUrl asUrl retrieveContents.
|
||||
^ rawData collect: [:assetDict |
|
||||
(assetDict at: #Assets) collect: [ :assetSubdict |
|
||||
self new fromDictionary: assetSubdict; language: isoCode
|
||||
].
|
||||
]
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
collectionFromRepository
|
||||
^ self collectionFromRepository: 'https://raw.githubusercontent.com/rsek/dataforged/main/dist/starforged/assets.json' language: 'en'
|
@ -1,7 +1,3 @@
|
||||
accessing
|
||||
asJsonTiddler
|
||||
<<<<<<< HEAD
|
||||
^ self asTiddler asJson
|
||||
=======
|
||||
^ self asTiddler asJson
|
||||
>>>>>>> master
|
||||
^ self asTiddler asJson
|
@ -1,3 +1,4 @@
|
||||
converting
|
||||
currentAbilities
|
||||
|
||||
^ self abilities at: 'enabled'
|
@ -1,6 +1,6 @@
|
||||
accessing
|
||||
fromDictionary: aDictionary
|
||||
name := aDictionary at: #Name.
|
||||
category := aDictionary at: #Category.
|
||||
abilities := self populateAbilities: (aDictionary at: #Abilities)
|
||||
category := ((aDictionary at: 'Asset Type') splitOn: '/') last copyReplaceAll: '_' with: ' '.
|
||||
abilities := self populateAbilities: (aDictionary at: #Abilities)
|
||||
|
@ -1,10 +1,12 @@
|
||||
accessing
|
||||
populateAbilities: abilitiesDictionary
|
||||
populateAbilities: abilitiesArray
|
||||
|
||||
| enabled disabled |
|
||||
enabled := abilitiesDictionary select: [ :abi | abi keys includes: 'Enabled' ].
|
||||
disabled := abilitiesDictionary reject: [ :abi | abi keys includes: 'Enabled' ].
|
||||
enabled := abilitiesArray select: [ :abi | (abi at: 'Enabled') = true ].
|
||||
disabled := abilitiesArray select: [ :abi | (abi at: 'Enabled') = false ].
|
||||
^ self abilities
|
||||
at: 'enabled' put: (enabled collect: [:abi | (abi at: 'Text') ]);
|
||||
at: 'disabled' put: (disabled collect: [:abi | (abi at: 'Text') ]);
|
||||
at: 'enabled' put: (enabled collect: [:abi |
|
||||
(WikiText new content: (abi at: 'Text')) convertMarkdownLinks ]);
|
||||
at: 'disabled' put: (disabled collect: [:abi |
|
||||
(WikiText new content: (abi at: 'Text')) convertMarkdownLinks ]);
|
||||
yourself.
|
@ -1,4 +0,0 @@
|
||||
I model a collection of Starforged assets.
|
||||
I use as inspiration the data provided by @rsek at this repostory:
|
||||
|
||||
https://github.com/rsek/datasworn
|
@ -1,8 +0,0 @@
|
||||
accessing
|
||||
fromUrlString: aString language: isoCode
|
||||
|
||||
| rawData |
|
||||
rawData := STON fromString: aString asUrl retrieveContents.
|
||||
self items: ((rawData at: 'Assets') collect: [:assetDict |
|
||||
SfAsset new fromDictionary: assetDict; language: isoCode ])
|
||||
|
@ -1,3 +0,0 @@
|
||||
accessing
|
||||
items: anObject
|
||||
items := anObject
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user