tukkek / javelin

Party-based roguelike (open-source strategy-RPG game).
https://javelinrl.wordpress.com/
64 stars 7 forks source link

Runes and Rune Gear #245

Open tukkek opened 5 years ago

tukkek commented 5 years ago

Runes would be consumable items that would add permanent bonuses to artifacts (basically the Artifact#prefix and Artifact#suffix of so many loot-based Action RPGs). Those bonuses would then be always active as long as an Artifact is equipped.

Runes prefixes/suffixes could be replaced, but that would mean losing the previous forever, creating interesting player decisions like: should I apply this rune of Strength to my frontliner's Artifact and lose the previous effect or just add it to my support hero's item, which would not be quite as useful but would be a pure net-worth positive for my team?

Ideally, there would be a Spell#isrune=null field which would have an (usually internal) object class that when instantiated would provide a prefix and suffix name, plus relevant apply methods to actually apply/remove stats when an object is equipped, removed or runed. An IsRune interface could also work but that would imply having 3 extra fields for every Item instance, while the previous approach could not have any (or maybe just a transitive one for cacheing the inner class instance). Better implementations may be considered.

Estimating prices should be fairly easy according to the Creating Magic Item rules, and easily extensible from Spells. It may require adding the "Item#continuous" field again and making sure every spell has that configured (or at least #isrune spells).

When first implementing this, all current spells and items should be scoured for potential runes. Other runes could also be added with mock spell classes or similar, if necessary. Future spells would then be responsible for determining their rune properties, as with other 'issomething' attributes.

A rune definition would carry both a prefix and suffix (eg. Strong Rune of Strength) but each individual rune would have an #isprefix which determines if it applies a prefix or suffix to the target Artifact (warning in case of replacement of a previous one). This allows runes to be only moderate in power, but two runes of the same type to be applied to the same Artifact for maximum effect, as long as the player finds one with the suffix and one with the prefix.

A rune selling Shop would probably be very welcome.

Despite it being linked to Spells naturally, inspirations could be found on any number of looter games, from Diablo 1-3 to Path of Exile, Destiny, Torchlight, etc.

tukkek commented 5 years ago

How to deal with non-stacking effects combining, either for 2 runes of the same type or 1-2 runes plus an actual Spell being cast from any other source? Maybe just have a Condition#isrunic field and use that for edge cases?

Examples of problems:

Another option is to create a RuneCondition that will override most methods and #equals() instead. Something like Spell#isrune=new RuneCondition("Prefix","Suffx",Spell.class,Condition.class). It will then delegate only to the relevant start/end Condition methods.

tukkek commented 5 years ago

Would be very cool if a spellcaster could waste a charge of a spell he knows to produce a Rune, given he has a Gem of value equal or less than the Rune being produced. Same with an Eidolon perhaps or other items. This would be achieved through the Use Items screen.

tukkek commented 5 years ago

To prevent each Spell instance from having a potentially complex object on their Spell#isrune field, maybe it's better for that field to be a Boolean, which then flag a Spell#getrune() method to be invoked (which throws Unsupported Operation by default).

tukkek commented 3 years ago

Suffixes that are Potions or Wand-like can be triggered when a Combatant is hit or hits an opponent. This could be an even less micro-management-heavy approach compared to the current implementation (and the original idea of adding at-will Spell uses) but it would probably reduce the pool of suffixes too (from any Spell to only is-potion and similar Spells).

It could require that prices are rebalanced, to be more in league with a Potion, which can only affect one target (self or target, in this case). Some research is needed to see if that would be the case but the at-will uses would remain the same, just not at-will from a player's perspective but that it triggers any time a hit lands.

Rings could still feature the current approach, using the item to cast a daily Spell charge but it could be challenging for players to understand the difference - all in all, they still would be listed as 'usable in battle" so it might not be too confusing ultimately.

tukkek commented 3 years ago

If suffixes ever become on-hit "procs", Ointments/Oils could be created - cheaper versions of Runes that work only for a day or so.