Shandalar - Feature Requests
Implement hybrid mana (implemented)
Comments
Posted by Korath » 20 Jul 2015, 07:10
commit 9336c62b80cfc66e5e9d69a45aec8e0b384d56e8
Author: Korath <dgk@Dirge.none>
Date: Mon Jul 20 03:07:37 2015 -0400
[TH] #579: 2-color hybrid mana in spell costs
There's no interface yet for arbitrary charging, either through the ACTIVATE()
macros or a free function, but otherwise seems complete. In particular, it's
assigned to cards while parsing cards.dat to build cards_ptr[], and is parsed
from the mana cost string; no intervention is needed within individual card
functions.
Should work even with the you-may-spend-colorA-mana-as-if-it-were-colorB
interface for Urza's Sunglasses, though I haven't tested it.
Replaces card_ptr_t::unknown43 and unknown44, which are known to be wholly
unused in Shandalar, with req_hybrid and hybrid_colors fields; and uses bytes
0 and 1 of pay_mana_xbugrwaU[7] for the same internally in mana.cpp. The
prior, nonworking usage of those for MicroProse's disabled Power Artifact
implementation is removed; that'll eventually need a more general solution
anyway.
Most of Phyrexian mana should be feasible with the same method, though it'll
need a better understanding of the UI first (so you can click on your life
total or perhaps a separate button in the floating center window to indicate a
life payment), and we may have to jump through hoops so life isn't actually
paid until all other costs are, rather than immediately or even at the end of
mana payment.
Monocolor hybrid will be harder; there'll need to be a way to record that half
of a symbol has been paid for. Consider a casting cost of {2W}{2W}{2W} as on
Spectral Procession: tap mana in the order
,
,
,
, and it's paid
for, but what should be displayed for the prompt just before the second
?
New functions:
apply_mana_in_pool_to_hybrid()
calculate_needed_mana_colors()
dlgproc_choose_a_card_helper()
hook_wndproc_ManaSummaryClass()
Support in:
amt_to_apply_to_cost()
apply_mana_to_cost()
charge_mana_impl()
charge_spell_cost()
choose_mana_all_one_color()
format_manacost_into_global_allpurpose_buffer()
get_casting_cost() (only marks that hybrid is present, not amount or colors)
has_mana_to_cast()
has_mana_to_cast_X()
pay_mana_maximally_satisfied()
try_to_pay_for_mana_by_autotapping()
Incidental:
The in-duel card chooser (for debug mode and Ring of Ma'ruf) ignores color
when Artifacts is selected, rather than requiring you to select a different
type, the appropriate color, and then Artifacts again to see colored artifacts.
(Colored artifact creatures still only show up under artifact, though.)
Author: Korath <dgk@Dirge.none>
Date: Mon Jul 20 03:07:37 2015 -0400
[TH] #579: 2-color hybrid mana in spell costs
There's no interface yet for arbitrary charging, either through the ACTIVATE()
macros or a free function, but otherwise seems complete. In particular, it's
assigned to cards while parsing cards.dat to build cards_ptr[], and is parsed
from the mana cost string; no intervention is needed within individual card
functions.
Should work even with the you-may-spend-colorA-mana-as-if-it-were-colorB
interface for Urza's Sunglasses, though I haven't tested it.
Replaces card_ptr_t::unknown43 and unknown44, which are known to be wholly
unused in Shandalar, with req_hybrid and hybrid_colors fields; and uses bytes
0 and 1 of pay_mana_xbugrwaU[7] for the same internally in mana.cpp. The
prior, nonworking usage of those for MicroProse's disabled Power Artifact
implementation is removed; that'll eventually need a more general solution
anyway.
Most of Phyrexian mana should be feasible with the same method, though it'll
need a better understanding of the UI first (so you can click on your life
total or perhaps a separate button in the floating center window to indicate a
life payment), and we may have to jump through hoops so life isn't actually
paid until all other costs are, rather than immediately or even at the end of
mana payment.
Monocolor hybrid will be harder; there'll need to be a way to record that half
of a symbol has been paid for. Consider a casting cost of {2W}{2W}{2W} as on
Spectral Procession: tap mana in the order
,
,
,
, and it's paidfor, but what should be displayed for the prompt just before the second
?New functions:
apply_mana_in_pool_to_hybrid()
calculate_needed_mana_colors()
dlgproc_choose_a_card_helper()
hook_wndproc_ManaSummaryClass()
Support in:
amt_to_apply_to_cost()
apply_mana_to_cost()
charge_mana_impl()
charge_spell_cost()
choose_mana_all_one_color()
format_manacost_into_global_allpurpose_buffer()
get_casting_cost() (only marks that hybrid is present, not amount or colors)
has_mana_to_cast()
has_mana_to_cast_X()
pay_mana_maximally_satisfied()
try_to_pay_for_mana_by_autotapping()
Incidental:
The in-duel card chooser (for debug mode and Ring of Ma'ruf) ignores color
when Artifacts is selected, rather than requiring you to select a different
type, the appropriate color, and then Artifacts again to see colored artifacts.
(Colored artifact creatures still only show up under artifact, though.)
Posted by Korath » 21 Jul 2015, 02:47
commit 93083ba056678e323003f748c56655df51beffa7
Author: Korath <dgk@Dirge.none>
Date: Mon Jul 20 22:46:09 2015 -0400
[TH] #579: stop autotapping specifically for hybrid once all hybrid costs paid
Author: Korath <dgk@Dirge.none>
Date: Mon Jul 20 22:46:09 2015 -0400
[TH] #579: stop autotapping specifically for hybrid once all hybrid costs paid
Posted by Korath » 21 Jul 2015, 02:49
commit cbcac3cb2371a5b222889a16f6572e9004ca4919
Author: Korath <dgk@Dirge.none>
Date: Mon Jul 20 22:48:38 2015 -0400
[TH] #579: add hybrid mana cost for debug mode "&M: Add mana for this card"
Author: Korath <dgk@Dirge.none>
Date: Mon Jul 20 22:48:38 2015 -0400
[TH] #579: add hybrid mana cost for debug mode "&M: Add mana for this card"
Posted by Korath » 23 Jul 2015, 17:23
commit 78b8ed06f7b454866b20954780cd7399ef16908d
Author: Korath <dgk@Dirge.none>
Date: Thu Jul 23 13:22:29 2015 -0400
[TH] #579: hybrid mana activation costs
Cards added:
Duergar Mine-Captain
Elvish Hexhunter
Frostburn Weird
Mirror Sheen
Rise of the Hobgoblins
Shrewd Hatchling
Sturdy Hatchling
Support:
ActivateMana(...Mana, color_test_t)
ActivateMana(...Mana, int, color_test_t)
has_mana_to_activate_hybrid()
charge_mana_to_activate_hybrid()
Author: Korath <dgk@Dirge.none>
Date: Thu Jul 23 13:22:29 2015 -0400
[TH] #579: hybrid mana activation costs
Cards added:
Duergar Mine-Captain
Elvish Hexhunter
Frostburn Weird
Mirror Sheen
Rise of the Hobgoblins
Shrewd Hatchling
Sturdy Hatchling
Support:
ActivateMana(...Mana, color_test_t)
ActivateMana(...Mana, int, color_test_t)
has_mana_to_activate_hybrid()
charge_mana_to_activate_hybrid()
Posted by Korath » 03 Aug 2015, 20:20
Marking implemented; monocolor hybrid costs have little more in common with two-color hybrid than the name.
5 Posts
• Page 1 of 1
Ticket details
- Ticket ID: 579
- Project: Shandalar
- Status: Implemented
- Component: (unknown)
- Project version: Thieves Hideout
- Priority: Normal
- Assigned to: Korath
- Reported by: Korath
- Reporter's tickets: List all tickets
- Reported on: 26 May 2015, 22:42
- Last visited by Korath » 26 Jul 2016, 21:04.