kenan-rhoton / card-game

An iteratively designed card game by the members of TrollPlayingGame Discord.
MIT License
0 stars 1 forks source link

Abilities as functions on backend #152

Closed Masclins closed 6 years ago

Masclins commented 6 years ago

Description

This changes how we understand and handle cards' abilities. They'll be functions that are called when the card is played.

Issues Resolved

This resolves #149 and prepares everything to make #150 (and any further ability) easier to implement.

Details

There'd been no change on the response to the frontend. That means that frontend will recieve a stringified function which will be useless.

I did the PR anyway for the following reasons:

Hotspots

rules.abilities/add-power and rules.play-card/apply-ability should be really clear for all developers, since it's how abilities will work.