Move heropower abilities into their own heropower cards #350

Closed
opened 2023-11-25 21:04:35 +00:00 by LunarTides · 0 comments
LunarTides commented 2023-11-25 21:04:35 +00:00 (Migrated from github.com)
// wildheart-guff.ts
import assert from 'node:assert';
import { type Blueprint } from '@Game/types.js';

export const blueprint: Blueprint = {
    name: 'Wildheart Guff',
    text: '<b>Battlecry:</b> Set your maximum Mana to 20. Gain an empty Mana Crystal. Draw a card.',
    cost: 5,
    type: 'Hero',
    heropowerId: ???, // Replace. Maybe this should instead be 'heropowerName'. If #273 is happening, go for id.
    classes: ['Druid'],
    rarity: 'Legendary',
    id: ???, // Replace

    battlecry(plr, self) {
        // Set your maximum Mana to 20. Gain an empty Mana Crystal. Draw a card.
        plr.maxMana = 20;
        plr.addEmptyMana(1);
        plr.drawCard();
    },

    test(plr, self) {
        // TODO: Add proper tests. #325
        return true;
    },
};
// wildheart-guff-heropower.ts
import assert from 'node:assert';
import { type Blueprint } from '@Game/types.js';

export const blueprint: Blueprint = {
    name: 'Wildheart Guff Heropower',
    displayName: '???', // Replace
    text: 'Choose One - Draw a card; or Gain an empty Mana Crystal',
    cost: 2,
    type: 'Spell', // Maybe even a new 'HeroPower' type
    classes: ['Druid'],
    rarity: 'Common',
    id: ???, // Replace

    cast(plr, self) {
        // Choose One - Draw a card; or Gain an empty Mana Crystal.
        game.interact.chooseOne(1, ['Draw a card', () => {
            // Draw a card
            plr.drawCard();
        }], ['Gain an empty Mana Crystal', () => {
            // Gain an empty ManaCrystal
            plr.addEmptyMana(1);
        }]);
    },

    test(plr, self) {
        // TODO: Add proper tests. #325
        return true;
    },
};
```ts // wildheart-guff.ts import assert from 'node:assert'; import { type Blueprint } from '@Game/types.js'; export const blueprint: Blueprint = { name: 'Wildheart Guff', text: '<b>Battlecry:</b> Set your maximum Mana to 20. Gain an empty Mana Crystal. Draw a card.', cost: 5, type: 'Hero', heropowerId: ???, // Replace. Maybe this should instead be 'heropowerName'. If #273 is happening, go for id. classes: ['Druid'], rarity: 'Legendary', id: ???, // Replace battlecry(plr, self) { // Set your maximum Mana to 20. Gain an empty Mana Crystal. Draw a card. plr.maxMana = 20; plr.addEmptyMana(1); plr.drawCard(); }, test(plr, self) { // TODO: Add proper tests. #325 return true; }, }; ``` ```ts // wildheart-guff-heropower.ts import assert from 'node:assert'; import { type Blueprint } from '@Game/types.js'; export const blueprint: Blueprint = { name: 'Wildheart Guff Heropower', displayName: '???', // Replace text: 'Choose One - Draw a card; or Gain an empty Mana Crystal', cost: 2, type: 'Spell', // Maybe even a new 'HeroPower' type classes: ['Druid'], rarity: 'Common', id: ???, // Replace cast(plr, self) { // Choose One - Draw a card; or Gain an empty Mana Crystal. game.interact.chooseOne(1, ['Draw a card', () => { // Draw a card plr.drawCard(); }], ['Gain an empty Mana Crystal', () => { // Gain an empty ManaCrystal plr.addEmptyMana(1); }]); }, test(plr, self) { // TODO: Add proper tests. #325 return true; }, }; ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LunarTides/Hearthstone.js#350
No description provided.