Skip to content

Commit

Permalink
Implement Crowdsource
Browse files Browse the repository at this point in the history
  • Loading branch information
filiph committed Sep 25, 2020
1 parent 64c475e commit 92ba19f
Show file tree
Hide file tree
Showing 6 changed files with 358 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ FIGHT_SITUATION:
generateDargTentFight

AFTER_MONSTERS_CLEARED:
I look around and there are no more orcs. They probably didn't consider it necessary to post guards around this remote place.
The fight is over. I look around and there are no more orcs. They probably didn't consider it necessary to post guards around this remote place.

[[CODE]]
c.markHappened(evKilledDarg);
Expand All @@ -41,15 +41,21 @@ RULE:
c.hasHappened(evDargLeftCrowdsource)

FIRST_DESCRIPTION:
Tent outside, at the top of the elevator structure. Overlooking the bay. Darg, the leader of the orcs, is here.
Tent outside, at the top of the elevator structure. Overlooking the bay. Darg, the leader of the orcs I first saw in the orcs' temple, is here.

// No need to talk about Darg's weapon or appearance. If we see him here, that means we saw him in Crowdsource before.

![Illustration of Darg, a huge orc with a weapon that resembles a battle axe.](darg.png)

[We] stay hidden.

VARIANT_UPDATE_DESCRIPTION:
Darg, the leader of the orcs, is here.
Darg, the leader of the orcs I first saw in the orcs' temple, is here.

![Illustration of Darg, a huge orc with a weapon that resembles a battle axe.](darg.png)

[We] stay hidden.


// ---
ROOM: $darg_tent_after_darg_killed
Expand Down Expand Up @@ -78,6 +84,10 @@ c.hasHappened(evDargLeftCrowdsource)
COMMAND: Darg >> Attack

COMPLETE_SUCCESS_DESCRIPTION:
[We] approach Darg's tent. Darg spots me and looks surprised at first, then amused.

"A human child, here?" Darg says, readying his battle axe. "Must have found a crawlspace to get here." He grins. "Never mind, [[IF c.playerIsMale]]boy[[ELSE]]girl[[ENDIF]]. I'll dance on your bones."

[[CODE]]
c.startOptionalFight();
[[ENDCODE]]
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ POS: 27, 29
MAP_NAME: Crowd's Temple

FIRST_DESCRIPTION:
A temple. Two orcs are talking. One of them is a shaman: an old but muscular female orc, with a long chain of human teeth around her neck, and a ceremonial dagger at her side. The shaman is addressing the other orc as Darg.
This room serves as a temple for the orcs. It has no windows and is lit by torches. The darkness and the rows of columns provide good opportunities to hide.

I can only see two orcs here. One of them is a shaman: an old but muscular female orc, with a long chain of human teeth around her neck, and a ceremonial dagger at her side. The shaman is talking with another orc, addressing him as Darg.

Darg is larger and considerably more muscular than the shaman. He is the leader of this orc outpost. A large battle axe made from ancient parts serves as both his weapon and his symbol of power.

Expand All @@ -24,7 +26,7 @@ FIGHT_SITUATION:
generateCrowdsourceFight

AFTER_MONSTERS_CLEARED:
I look around and there are no more orcs. The corridors are silent. I am fortunate that the temple is so secluded from the rest of the orcs' complex.
The fight is over. I look around and there are no more orcs. The corridors are silent. I am fortunate that the temple is so secluded from the rest of the orcs' complex.

[[CODE]]
c.markHappened(evKilledDarg);
Expand Down Expand Up @@ -62,10 +64,59 @@ PREREQUISITES:

COMMAND: Orcs >> Listen

COMPLETE_SUCCESS_DESCRIPTION:
TODO: The shaman is trying to persuade Darg to open the antechamber.
INK:
// The shaman is trying to persuade Darg to open the antechamber. She hates the waiting.
"Only you have the power," the shaman is saying to Darg. "Use it! Talk to him!"

Darg takes a step back from her and shakes his head. "The Maker will call me. Before that, my hands are tied. A mouse does not ask to visit the cat."

The shaman sighs and takes a step toward Darg. Her hushed voice reverberates through the large space. "The Maker gave you the Null. Why else would he give it to you other than for you to use it?"

* Listen some more

Darg lowers his voice, too. "You don't know him the way I do. He's no orc. No human. I have never seen his face but there's something in his voice." Darg pauses and lowers his voice even further. "He's terrifying."

The shaman growls. "You're afraid," she says.

Darg's huge hand moves quickly and squeezes the back of the shaman's neck. His angry snarl fills the temple.

"I have a weakness for you, shaman," he says. "But say something like that one more time and I break you and dance on your bones." He glances around. "My guard is close, he could have heard."

* * Listen some more

After a brief moment of silence, the shaman starts talking again. Her voice is softer now. "If we can't ask the Maker for permission, so be it. We can attack now, and ask him for forgiveness later."

Darg shakes his head, but the shaman continues.

"It will be an easy win and you know it. The crowd is ready. We can take the whole tower today. There will be no resistance."

* * * Listen some more

"You don't know that," Darg says and watches the shaman, once again, take a step towards him.

"Of course I do, Darg," the shaman says. "Didn't you hear the hawk? He saw a company of knights leaving the tower and traveling south. They've abandoned this place."

TODO: It is obvious that attacking now would be inadvisable unless the player is well prepared.
"It might have been only a part of them," Darg says. "Others might be still inside."

* * * * Listen some more

"So what," the shaman grins and places her hand on Darg's crotch. "We'll kill them."

Darg freezes, then slowly pulls away her hand. "We'll wait for the Maker's decision," he says. "The Maker's plan is larger than the tower itself. Attacking now seems obvious, but it can be a bad mistake."

The shaman draws away from Darg but says nothing. I can hear her breathe.

"Knowing to avoid bad mistakes like this is why I have the Null," Darg says. "I know the crowd is only a small part of this machine, and I don't see where it fits." He gestures to encompass the room. "Now prepare for the daily."

The shaman frowns but moves away from Darg and starts preparing the temple for some kind of a ritual. Darg watches her work.

* * * * Stop

* * * Stop

* * Stop

* Stop


// ---
Expand All @@ -81,6 +132,16 @@ w.actionHasBeenPerformed('crowdsource_listen')
COMMAND: Orcs >> Attack

COMPLETE_SUCCESS_DESCRIPTION:
[We] step from behind the columns and approach the two orcs.

"Humans?" the shaman says. "Here?"

"Looks like a child," Darg says, readying his battle axe. "Must have found a crawlspace to get here."

The shaman takes a ceremonial dagger from a nearby nook and stands next to Darg. "Let's kill together, Darg. Like in Oak Land so many moons ago."

Darg grins.

[[CODE]]
c.startOptionalFight();
[[ENDCODE]]
Expand All @@ -95,7 +156,7 @@ DESCRIPTION: $NONE


NOTES:
- This is where you finally confront the Akxe orc (named captain - Darg).
- This is where you finally confront the Akxe orc (named Darg).
- Darg's head talks after you kill him. Big O is taunting you.
- Darg's Akxe is the key to the antechamber.
- Darg's badge is the key to the antechamber.
- You might see him before, but shouldn't be able to kill him.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ A glorious battle this was, I'm sure. It became a scab.

Whatever the reason for this cleared space had been in the ancient times, I can imagine how the Knights preferred it for battle when they still had the numbers. There is no way to go past it, and the plan is so open you can conceivably use archers, and formations.

Searching through the orc's posession, I find a stale bread.
Searching through the orc's posession, I find a loaf of stale bread.

[[CODE]]
c.giveNewItemToPlayer(staleBread);
Expand Down
2 changes: 2 additions & 0 deletions edgehead/lib/src/ink/actions/ink_choose.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ class InkChoose extends Action<InkChoicePointer> {
// We have finished. Pop the [InkSituation].
context.outputWorld.popSituation(context);
} else {
// The INK continues. Rebuild this situation with the new
// [InkSituation.currentPath].
context.outputWorld.replaceSituationById<InkSituation>(inkSituation.id,
inkSituation.rebuild((b) => b.currentPath.replace(end)));
}
Expand Down
4 changes: 3 additions & 1 deletion edgehead/lib/writers_helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ FightSituation generateCrowdsourceFight(ActionContext c,
[shaman, edgeheadDarg],
"{temple |}floor",
roomRoamingSituation,
{},
{
// TODO: guard joins the fight
},
items: const [],
);
}
Expand Down
Loading

0 comments on commit 92ba19f

Please sign in to comment.