+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/components/card/TriangleArt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class TriangleArt extends React.PureComponent<TriangleArtProps> {
return (
<img
src={inBrowser() ? trianglify(this.opts).png() : ''}
alt="Event card image"
alt="Action card image"
width={this.props.width}
height={this.props.height}
style={{imageRendering: 'pixelated'}}
Expand Down
10 changes: 6 additions & 4 deletions src/common/components/cards/CardCreationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default class CardCreationForm extends React.Component<CardCreationFormPr

attributeContainer: { width: '100%', marginRight: 25, marginTop: 8, textAlign: 'center' },
attribute: { width: 50 },

buttonText: {
fontSize: 14,
textTransform: 'uppercase',
Expand Down Expand Up @@ -166,7 +166,7 @@ export default class CardCreationForm extends React.Component<CardCreationFormPr

get textError(): string | null {
if (this.event && !this.hasCardText) {
return 'Events must have card text.';
return 'Action cards must have card text.';
} else if (this.parseErrors.length > 0) {
return this.parseErrors.join(' ');
} else if (this.nonEmptySentences.find((s) => !s.result.js)) {
Expand Down Expand Up @@ -270,6 +270,7 @@ export default class CardCreationForm extends React.Component<CardCreationFormPr
disabled={isReadonly}
label={<div style={{ marginLeft: 30, marginTop: 5 }}>Cost</div>}
value={this.props.cost}
minValue={0}
maxValue={20}
style={CardCreationForm.styles.energyCost}
inputProps={{
Expand Down Expand Up @@ -355,7 +356,7 @@ export default class CardCreationForm extends React.Component<CardCreationFormPr

<div style={CardCreationForm.styles.section}>
{this.renderAttributeField('attack', this.robot && !isReadonly)}
{this.renderAttributeField('health', !this.event && !isReadonly)}
{this.renderAttributeField('health', !this.event && !isReadonly, {min: 1})}
{this.renderAttributeField('speed', this.robot && !isReadonly, {max: 3})}
</div>

Expand Down Expand Up @@ -465,7 +466,7 @@ export default class CardCreationForm extends React.Component<CardCreationFormPr
}).catch(console.error);
}

private renderAttributeField(attribute: 'attack' | 'health' | 'speed', enabled = true, opts: { max?: number } = {}): JSX.Element {
private renderAttributeField(attribute: 'attack' | 'health' | 'speed', enabled = true, opts: { min?: number, max?: number } = {}): JSX.Element {
const iconClasses = {
attack: 'crossed-swords',
speed: 'shoe-prints',
Expand All @@ -477,6 +478,7 @@ export default class CardCreationForm extends React.Component<CardCreationFormPr
<NumberField
label={capitalize(attribute)}
value={this.props[attribute]}
minValue={opts.min || 0}
maxValue={opts.max || 10}
style={CardCreationForm.styles.attribute}
disabled={!enabled}
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/cards/DeckSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default class DeckSummary extends React.Component<DeckSummaryProps> {
margin: '20px 0 20px -10px'
}}
>
Events ({events.length})
Actions ({events.length})
</h4>
{this.renderCards(events)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/cards/FilterControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class FilterControls extends React.Component<FilterControlsProps>
onChange={this.props.onToggleFilter('events')}
/>
}
label="Events"
label="Actions"
labelPlacement="start"
style={{ justifyContent: 'space-between', marginBottom: -12 }}
/>
Expand Down
5 changes: 3 additions & 2 deletions src/common/components/cards/NumberField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as React from 'react';
interface NumberFieldProps {
label: React.ReactNode
value: number
minValue: number
maxValue: number
style?: React.CSSProperties
disabled?: boolean
Expand All @@ -22,8 +23,8 @@ export default class NumberField extends React.Component<NumberFieldProps> {
style={this.props.style || {}}
type="number"
inputProps={{
min: 0,
max: this.props.maxValue || 10,
min: this.props.minValue,
max: this.props.maxValue,
style: this.props.inputProps?.style || {}
}}
InputProps={this.props.inputProps}
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/game/TutorialIntroScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class TutorialIntroScreen extends React.Component<TutorialIntroScreenProps & Wit
<DialogTitle>Wordbots Gameplay Tutorial</DialogTitle>
<DialogContent>
<p>Welcome to the Wordbots Tutorial!</p>
<p>This tutorial should take just 3 to 5 minutes to complete and will teach you all the basic gameplay mechanics required to play the game of Wordbots, including how to place robots onto the board, how to use events to tilt the game in your favor, and the basic steps that go into each turn.</p>
<p>This tutorial should take just 3 to 5 minutes to complete and will teach you all the basic gameplay mechanics required to play the game of Wordbots, including how to place robots onto the board, how to play action cards to tilt the game in your favor, and the basic steps that go into each turn.</p>
<p>When prompted, hit the <b>Next</b> button to continue to the next step. To leave at any point during the tutorial hit the <b>Forfeit</b> (🏳️) button.</p>
</DialogContent>
<DialogActions>
Expand Down
10 changes: 5 additions & 5 deletions src/common/components/help/CreatorHelpDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ export default class CreatorHelpDialog extends React.Component<{ history: Histor
const helpText = (location: Location) => `
## Types of Cards

* A **robot** must played adjacent to your kernel, and can move, attack, and activate.
* A **structure** can be played adjacent to your kernel, robots, or structures, and can activate but not move or attack.
* An **event** performs an action and is immediately discarded.
* A **robot** card must played adjacent to your kernel, and can move, attack, and activate.
* A **structure** card can be played adjacent to your kernel, robots, or structures, and can activate but not move or attack.
* An **action** card performs some action and is immediately discarded.

## Types of Sentences

Expand All @@ -67,7 +67,7 @@ In a nutshell:
* **Triggered ability**: "Whenever this robot attacks, your adjacent robots get +1 health."
* **Activated ability**: "Activate: Give a robot +1 health."

There are two types of sentences: _actions_ and _abilities_. Events have actions; robots and structures have abilities.
There are two types of sentences: _actions_ and _abilities_. Action cards have actions; robot and structure cards have abilities.

There are three types of abilities: _passive_, _triggered_, and _activated_.

Expand All @@ -89,7 +89,7 @@ If any words are underlined in red in the card preview, that means that the pars

**2. Are you writing the right kind of sentence for the card type?**

Remember that events must have actions, while robots/structures must have abilities. For example, if you’re making an event, you can’t say "All robots have +1 attack" – because “have” indicates a passive ability, not an action. (You’d need to say “Give all robots +1 attack” instead.)
Remember that action cards must perform one-time actions, while robots/structures must have recurring abilities. For example, if you’re making an action, you can’t say "All robots have +1 attack" – because “have” indicates a passive ability, not an action. (You’d need to say “Give all robots +1 attack” instead.)

**3. Is your phrasing incorrect?**

Expand Down
3 changes: 2 additions & 1 deletion src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export const CREATABLE_TYPES: CardType[] = [TYPE_ROBOT, TYPE_EVENT, TYPE_STRUCTU

const typeToStringMapping: Record<string, string> = {
[TYPE_ROBOT]: 'robot',
[TYPE_EVENT]: 'event',
[TYPE_EVENT]: 'action',
[TYPE_CORE]: 'kernel',
[TYPE_STRUCTURE]: 'structure'
};
Expand Down Expand Up @@ -185,6 +185,7 @@ export const SYNONYMS = {
'can\'t': 'cannot',
'it is': 'it\'s',

'action': ['event'],
'robot': ['creature', 'minion'],
'startup': ['start up', 'start-up'],
'shutdown': ['shut down', 'shut-down']
Expand Down
18 changes: 9 additions & 9 deletions src/common/containers/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ There are two things you can do on your turn:

### Playing Cards

There are three types of cards: **events**, **robots**, and **structures**. Events are one-time effects that trigger instantly, while robots and structures are objects that get placed on the board.
There are three types of cards: **actions**, **robots**, and **structures**. Actions are one-time effects that trigger instantly, while robots and structures are objects that get placed on the board.

To play an **event** card, click on the card in your hand, then click on the board. Some event cards require you to select one or more objects or tiles on the board for their ability. Other event cards just need you to click anywhere on the board to confirm that you want to play them.
To play an **action** card, click on the card in your hand, then click on the board. Some action cards require you to select one or more objects or tiles on the board for their ability. Other action cards just need you to click anywhere on the board to confirm that you want to play them.

To play a **robot** or **structure** card, click on the card in your hand, then click on where you want to place that robot or structure.

Expand Down Expand Up @@ -109,6 +109,12 @@ const terminology = `

---

**action**

A one-time-use card whose effect immediately happens when you play it.

---

**activate**

Some **robots** and **structures** have an "Activate" ability _(for example: "**Activate**: Draw a card")_. Each robot or structure's Activate ability can be used once per turn, but a robot cannot activate and attack on the same turn.
Expand All @@ -135,7 +141,7 @@ An **object** can be destroyed when its **health** goes to 0, or when a card is

**discard pile**

Your discard pile holds **event** cards that you've played and your **objects** that have been **destroyed**.
Your discard pile holds **action** cards that you've played and your **objects** that have been **destroyed**.

---

Expand All @@ -145,12 +151,6 @@ The resource used to play cards. Every turn, your energy recharges up to your **

---

**event**

A one-time-use card whose effect immediately happens when you play it.

---

**health**

An **object**'s Health (\`ra ra-health\`) stat indicates how much damage it can take before being **destroyed**.
Expand Down
8 changes: 4 additions & 4 deletions src/common/reducers/handlers/game/tutorial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,14 @@ const tutorialScript: w.TutorialStepInScript[] = [
{
tooltip: {
card: 'Upgrade',
text: 'Events are cards whose effects happen immediately. Click on this here event card.'
text: 'Actions are cards whose effects happen immediately. Click on this here action card.'
},
action: actions.setSelectedCard(0, 'orange')
},
{
tooltip: {
hex: '0,1,-1',
text: 'Now click our One Bot to apply the Upgrade event to it. Let\'s see what happens!'
text: 'Now click our One Bot to apply the Upgrade action to it. Let\'s see what happens!'
},
action: actions.setSelectedTile('0,1,-1', 'orange')
},
Expand Down Expand Up @@ -306,14 +306,14 @@ const tutorialScript: w.TutorialStepInScript[] = [
{
tooltip: {
card: 'Recharge',
text: 'We can recharge our robot to use it again this turn! You know the drill. Click the event card.'
text: 'We can recharge our robot to use it again this turn! You know the drill. Click the action card.'
},
action: actions.setSelectedCard(0, 'orange')
},
{
tooltip: {
card: 'Recharge',
text: 'This event affects the whole board, so click anywhere on the board to play it.'
text: 'This action affects the whole board, so click anywhere on the board to play it.'
},
action: actions.SET_SELECTED_TILE
},
Expand Down
4 changes: 2 additions & 2 deletions src/common/store/decks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const aggro: w.CardInStore[] = createDeck([
[cards.leapFrogBotCard, 2],
[cards.generalBotCard, 1],

// Events (8)
// Actions (8)
[cards.gustOfWindCard, 2],
[cards.concentrationCard, 2],
[cards.rampageCard, 2],
Expand All @@ -47,7 +47,7 @@ export const healing: w.CardInStore[] = createDeck([
[cards.calmMonkCard, 1],
[cards.effectiveTrollCard, 1],

// Events (10)
// Actions (10)
[cards.concentrationCard, 2],
[cards.vampirePotionCard, 1],
[cards.equalizeCard, 2],
Expand Down
12 changes: 6 additions & 6 deletions test/integration/100randomActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ const actions = [
"(function () { actions['forEach'](cardsInHand(targets['itP'](), 'anycard'), (function () { actions['canMoveAndAttackAgain'](targets['they']()); })); })",
"(function () { actions['payEnergy'](targets['self'](), energyAmount(targets['self']())); })",
"(function () { actions['takeControl'](targets['self'](), targets['it']()); })",
"(function () { actions['payEnergy'](targets['allPlayers'](), ((attributeSum(cardsInHand(targets['theyP'](), 'event'), 'health')) * (count(cardsInHand(targets['controllerOf'](objectsMatchingConditions('kernel', [])), 'anycard'))))); })",
"(function () { actions['payEnergy'](targets['allPlayers'](), ((attributeSum(cardsInHand(targets['theyP'](), 'action'), 'health')) * (count(cardsInHand(targets['controllerOf'](objectsMatchingConditions('kernel', [])), 'anycard'))))); })",
"(function () { actions['removeAllAbilities'](targets['they']()); })",
"(function () { save('duration', 3); (function () { actions['canMoveAndAttackAgain'](targets['they']()); })(); save('duration', null); })",
"(function () { actions['modifyAttribute'](load('target'), 'attack', function (x) { return energyAmount(targets['allPlayers']()); }); })",
"(function () { actions['giveAbility'](targets['it'](), \"(function () { setAbility(abilities['attributeAdjustment'](function () { return targets['choose'](cardsInDiscardPile(targets['itP'](), 'allobjects')); }, 'health', function (x) { return Math.ceil(x / count(allTiles())); })); })\"); })",
"(function () { actions['discard'](targets['random'](energyAmount(targets['allPlayers']()), cardsInDiscardPile(targets['allPlayers'](), 'allobjects'))); })",
"(function () { actions['become'](targets['it'](),targets['choose'](cardsInHand(targets['theyP'](), 'event')));})",
"(function () { actions['become'](targets['it'](),targets['choose'](cardsInHand(targets['theyP'](), 'action')));})",
"(function () { actions['endTurn'](); })",
"(function () { actions['removeAllAbilities'](targets['thisRobot']()); })",
"(function () { actions['moveObject'](targets['they'](), targets['that']()); })",
Expand All @@ -21,7 +21,7 @@ const actions = [
"(function () { actions['draw'](targets['self'](), attributeValue(targets['that'](), 'attack')); })",
"(function () { actions['removeAllAbilities'](load('target')); })",
"(function () { actions['modifyAttribute'](targets['choose'](other(other(other(objectsMatchingConditions('kernel', [conditions['unoccupied'](), conditions['adjacentTo'](load('target')), conditions['controlledBy'](targets['controllerOf'](targets['thisRobot']()))]))))), 'cost', function (x) { return 0; }); })",
"(function () { actions['shuffleCardsIntoDeck'](targets['choose'](cardsInDiscardPile(targets['allPlayers'](), 'event')), targets['allPlayers']()); })",
"(function () { actions['shuffleCardsIntoDeck'](targets['choose'](cardsInDiscardPile(targets['allPlayers'](), 'action')), targets['allPlayers']()); })",
"(function () { actions['swapAttributes'](targets['choose'](objectsMatchingConditions('allobjects', [])), 'speed', 'speed'); })",
"(function () { save('duration', 3); (function () { actions['moveObject'](targets['they'](), targets['that']()); })(); save('duration', null); })",
"(function () { actions['removeAllAbilities'](targets['it']()); })",
Expand All @@ -43,7 +43,7 @@ const actions = [
"(function () { actions['payEnergy'](targets['opponent'](), attributeSum(cardsInHand(targets['opponent'](), 'allobjects'), 'speed')); })",
"(function () { actions['takeControl'](targets['theyP'](), targets['choose'](other(other(objectsMatchingConditions([], [conditions['unoccupied']()]))))); })",
"(function () { actions['payEnergy'](targets['self'](), 0); })",
"(function () { actions['modifyAttribute'](other(other(objectsMatchingConditions('robot', [conditions['hasProperty']('isdamaged'), conditions['exactDistanceFrom'](count(allTiles()), targets['thisRobot']())]))), 'allattributes', function (x) { return x - attributeSum(cardsInHand(targets['theyP'](), 'event'), 'speed'); }); })",
"(function () { actions['modifyAttribute'](other(other(objectsMatchingConditions('robot', [conditions['hasProperty']('isdamaged'), conditions['exactDistanceFrom'](count(allTiles()), targets['thisRobot']())]))), 'allattributes', function (x) { return x - attributeSum(cardsInHand(targets['theyP'](), 'action'), 'speed'); }); })",
"(function () { actions['dealDamage'](targets['it'](), attributeValue(other(objectsMatchingConditions('kernel', [conditions['exactDistanceFrom'](attributeValue(objectsMatchingConditions('allobjects', []), 'attack'), load('target'))])), 'cost')); })",
"(function () { actions['draw'](targets['self'](), 0); })",
"(function () { actions['forEach'](targets['allPlayers'](), (function () { actions['dealDamage'](targets['controllerOf'](load('target')), attributeValue(targets['it'](), 'attack')); })); })",
Expand Down Expand Up @@ -71,7 +71,7 @@ const actions = [
"(function () { actions['spawnObject'](targets['choose'](cardsInDiscardPile(targets['allPlayers'](), 'allobjects')), allTiles(), targets['theyP']()); })",
"(function () { actions['modifyEnergy'](targets['self'](), function (x) { return x * attributeSum(cardsInHand(targets['self'](), 'robot'), 'cost'); }); })",
"(function () { actions['removeAllAbilities'](targets['random'](0, objectsMatchingConditions(['kernel'], []))); })",
"(function () { actions['shuffleCardsIntoDeck'](targets['random'](energyAmount(targets['itP']()), cardsInHand(targets['itP'](), 'event')), targets['self']()); })",
"(function () { actions['shuffleCardsIntoDeck'](targets['random'](energyAmount(targets['itP']()), cardsInHand(targets['itP'](), 'action')), targets['self']()); })",
"(function () { actions['moveObject'](targets['they'](), allTiles()); })",
"(function () { actions['shuffleCardsIntoDeck'](targets['all'](cardsInDiscardPile(targets['itP'](), 'kernel')), targets['controllerOf'](objectsMatchingConditions('kernel', []))); })",
"(function () { actions['moveCardsToHand'](targets['all'](cardsInHand(targets['opponent'](), 'anycard')), targets['itP']()); })",
Expand All @@ -86,7 +86,7 @@ const actions = [
"(function () { actions['setAttribute'](targets['that'](), 'attack', \"(() => attributeValue(targets['it'](), 'health'))\"); })",
"(function () { actions['forEach'](cardsInDiscardPile(targets['itP'](), 'kernel'), (function () { actions['canMoveAgain'](load('target')); })); })",
"(function () { actions['modifyEnergy'](targets['itP'](), function (x) { return Math.ceil(x / attributeSum(cardsInDiscardPile(targets['opponent'](), 'allobjects'), 'attack')); }); })",
"(function () { actions['modifyAttribute'](targets['choose'](cardsInDiscardPile(targets['allPlayers'](), 'structure')), 'allattributes', function (x) { return x - attributeSum(cardsInHand(targets['theyP'](), 'event'), 'speed'); }); })",
"(function () { actions['modifyAttribute'](targets['choose'](cardsInDiscardPile(targets['allPlayers'](), 'structure')), 'allattributes', function (x) { return x - attributeSum(cardsInHand(targets['theyP'](), 'action'), 'speed'); }); })",
"(function () { actions['shuffleCardsIntoDeck'](targets['copyOf'](targets['it']()), targets['opponent']()); })",
"(function () { actions['canMoveAndAttackAgain'](targets['they']()); })",
"(function () { actions['moveCardsToHand'](targets['copyOf'](load('target')), targets['self']()); })",
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载