Shandalar - Program Bugs
Magical Hack does not change land text on dual land (fix completed)
Paladin at the works again...
AI cast Magical Hack on a Tundra. It can now produce
or
but it still says 'Plains Island'.
http://s103.photobucket.com/user/jiansonz/media/Hack_zpsfxp2leph.jpg.html
I am not sure if the Tundra counts as a Swamp for other purposes (e.g. Karma, Bog Wraith) but that would be easy to test.
Sidenote: The AI for Magical Hack is worse than it used to be. In the example above, it would clearly be better to 1) hold on to it until it's useful to Hack something and 2) if anything, not give yourself a Swamp when you play with a deck with Karma in it.
AI cast Magical Hack on a Tundra. It can now produce
or
but it still says 'Plains Island'. http://s103.photobucket.com/user/jiansonz/media/Hack_zpsfxp2leph.jpg.html
I am not sure if the Tundra counts as a Swamp for other purposes (e.g. Karma, Bog Wraith) but that would be easy to test.
Sidenote: The AI for Magical Hack is worse than it used to be. In the example above, it would clearly be better to 1) hold on to it until it's useful to Hack something and 2) if anything, not give yourself a Swamp when you play with a deck with Karma in it.

Last edited by Korath on 03 Jun 2015, 16:04, edited 3 times in total.
Reason: Component Individual Card->Duel Engine; hack and sleight aren't implemented at the card level
Reason: Component Individual Card->Duel Engine; hack and sleight aren't implemented at the card level
Comments
Posted by Korath » 03 Jun 2015, 15:58
Relevant Manalink bug, which I'm working around in the short-term.
The reminder text probably isn't fixable. So that hacked blue-black Tundra will still read "
: Add either
or
to your mana pool.)" even though it'll have the right type text, mana stripes, and actual behavior.
Tangents:
The hacked land types are recognized in most cases. Cards still using the original Shandalar implementations will recognize them if they look at the basiclandtypes_controlled[][] array (that is, if they're only looking for a count of landtypes, or whether one or more is controlled) or if they use the has_basic_landtype_of_color() function (when examining a particular card); but not if they look at internal_card_id, csv_id, or card_instance_t::color, or if they use the is_basic_land_type_of_color() function (also when examining a particular card).
So Karma and landwalk and Flashfires should all work, in theory. (In practice, none do, and I'm not sure why.) Living Lands and Kormus Bell and Conversion won't (they're the only users of is_basic_land_type_of_color()), though Magical Hacking the enchantments or artifact works properly. Inappropriate uses of internal_card_id, csv_id, and card_instance_t::color aren't easily searched for. But that's largely unrelated to this bug.
AI behavior is completetly unrelated to this bug, and not a trivial enough issue that I can fix it incidental to this, so should be reported separately. (I hadn't forgotten the original report in the forum thread, and still have a tab open there.)
The reminder text probably isn't fixable. So that hacked blue-black Tundra will still read "
: Add either
or
to your mana pool.)" even though it'll have the right type text, mana stripes, and actual behavior.Tangents:
The hacked land types are recognized in most cases. Cards still using the original Shandalar implementations will recognize them if they look at the basiclandtypes_controlled[][] array (that is, if they're only looking for a count of landtypes, or whether one or more is controlled) or if they use the has_basic_landtype_of_color() function (when examining a particular card); but not if they look at internal_card_id, csv_id, or card_instance_t::color, or if they use the is_basic_land_type_of_color() function (also when examining a particular card).
So Karma and landwalk and Flashfires should all work, in theory. (In practice, none do, and I'm not sure why.) Living Lands and Kormus Bell and Conversion won't (they're the only users of is_basic_land_type_of_color()), though Magical Hacking the enchantments or artifact works properly. Inappropriate uses of internal_card_id, csv_id, and card_instance_t::color aren't easily searched for. But that's largely unrelated to this bug.
AI behavior is completetly unrelated to this bug, and not a trivial enough issue that I can fix it incidental to this, so should be reported separately. (I hadn't forgotten the original report in the forum thread, and still have a tab open there.)
Posted by Korath » 03 Jun 2015, 16:02
commit 84f2a3bd27e77ac626049901b7e4787d41cac051
Author: Korath <dgk@Dirge.none>
Date: Wed Jun 3 12:01:42 2015 -0400
[Shandalar] FIX #597: fullcard type_text line affected by Magical Hack
And rewrite type text of all cards with basic land types at runtime until
viewtopic.php?f=86&p=180136#p180136
is fixed.
Author: Korath <dgk@Dirge.none>
Date: Wed Jun 3 12:01:42 2015 -0400
[Shandalar] FIX #597: fullcard type_text line affected by Magical Hack
And rewrite type text of all cards with basic land types at runtime until
viewtopic.php?f=86&p=180136#p180136
is fixed.
Posted by Korath » 03 Jun 2015, 17:07
commit 30ab0149c67b749549343031dd37dcbe17a062c8
Author: Korath <dgk@Dirge.none>
Date: Wed Jun 3 13:06:11 2015 -0400
[Shandalar] #597: has_subtype() honors Magical Hack on card being examined
So hacking a basic land or alpha dual land is properly detected by things like
Sea Serpent, Karma, Flashfires, landwalk, etc.
Add internal implementations of get_hacked_color() and get_sleighted_color() at
the customary get_hack()/get_sleight() names, and add overloads taking a
card_instance_t* instead of a {player,card} pair. Move most get_hack()
variants to take a card_instance_t*, with the {player,card} overloads inlined
to call them; this significantly simplifies calls similar to that in e.g.
enchanted_land_is_a_basic_landtype_find_land_to_change_to().
Author: Korath <dgk@Dirge.none>
Date: Wed Jun 3 13:06:11 2015 -0400
[Shandalar] #597: has_subtype() honors Magical Hack on card being examined
So hacking a basic land or alpha dual land is properly detected by things like
Sea Serpent, Karma, Flashfires, landwalk, etc.
Add internal implementations of get_hacked_color() and get_sleighted_color() at
the customary get_hack()/get_sleight() names, and add overloads taking a
card_instance_t* instead of a {player,card} pair. Move most get_hack()
variants to take a card_instance_t*, with the {player,card} overloads inlined
to call them; this significantly simplifies calls similar to that in e.g.
enchanted_land_is_a_basic_landtype_find_land_to_change_to().
Posted by Korath » 03 Jun 2015, 19:31
commit ec50d2421482cf6ffb602692692cc33b07bdaa1d
Author: Korath <dgk@Dirge.none>
Date: Wed Jun 3 15:30:32 2015 -0400
[Shandalar] #547, #597: rewrite Living Lands, Kormus Bell
Keeping the basic outline of the original versions; but honor Magical Hack
effects on the lands themselves, don't turn off Kormus Bell if it's tapped but
not a creature, and move much of the functionality into animate_land_legacy().
Rewritten:
Kormus Bell
Living Lands
Support:
animate_land_legacy()
event_result_is_basic_landtype_of_color()
Author: Korath <dgk@Dirge.none>
Date: Wed Jun 3 15:30:32 2015 -0400
[Shandalar] #547, #597: rewrite Living Lands, Kormus Bell
Keeping the basic outline of the original versions; but honor Magical Hack
effects on the lands themselves, don't turn off Kormus Bell if it's tapped but
not a creature, and move much of the functionality into animate_land_legacy().
Rewritten:
Kormus Bell
Living Lands
Support:
animate_land_legacy()
event_result_is_basic_landtype_of_color()
Posted by Korath » 03 Jun 2015, 20:23
commit 1367036fd70d5d3e9c6ea289ebd85b017024a575
Author: Korath <dgk@Dirge.none>
Date: Wed Jun 3 16:22:08 2015 -0400
[Shandalar] #597: rewrite Conversion
So it honors Magical Hack effects directly on the lands it's converting (e.g.
an Underground Sea hacked from Island-Swamp to Mountain-Swamp turns into a
Plains); and preserves the Snow supertype if snow-covered lands exist, just
like Evil Presence/Spreading Seas/Phantasmal Terrain do. Still doesn't
preserve card name, Legendary supertype, or lack of Basic supertype.
Rewritten:
Conversion
Support:
basic_land_iid_of_color()
Removed:
is_basic_landtype_of_color_for_exe(), now orphaned
Author: Korath <dgk@Dirge.none>
Date: Wed Jun 3 16:22:08 2015 -0400
[Shandalar] #597: rewrite Conversion
So it honors Magical Hack effects directly on the lands it's converting (e.g.
an Underground Sea hacked from Island-Swamp to Mountain-Swamp turns into a
Plains); and preserves the Snow supertype if snow-covered lands exist, just
like Evil Presence/Spreading Seas/Phantasmal Terrain do. Still doesn't
preserve card name, Legendary supertype, or lack of Basic supertype.
Rewritten:
Conversion
Support:
basic_land_iid_of_color()
Removed:
is_basic_landtype_of_color_for_exe(), now orphaned
Posted by Korath » 03 Jun 2015, 20:54
commit 50bbb701e2dd59716e77b73cd64aaee31ee81f36
Author: Korath <dgk@Dirge.none>
Date: Wed Jun 3 16:53:04 2015 -0400
[Shandalar] #597: change mana symbols in reminder text of Hacked lands
And rewrite relevant reminder text at runtime until it's in Manalink.csv -
viewtopic.php?f=86&p=180136#p180136
Author: Korath <dgk@Dirge.none>
Date: Wed Jun 3 16:53:04 2015 -0400
[Shandalar] #597: change mana symbols in reminder text of Hacked lands
And rewrite relevant reminder text at runtime until it's in Manalink.csv -
viewtopic.php?f=86&p=180136#p180136
8 Posts
• Page 1 of 1
Ticket details
- Ticket ID: 597
- Project: Shandalar
- Status: Fix completed
- Component: Duel Engine
- Project version: Ruined Tower 2
- Priority: Normal
- Severity: Minor
- Assigned to: Korath
- Reported by: jiansonz
- Reporter's tickets: List all tickets
- Reported on: 02 Jun 2015, 17:01
- Last visited by Korath » 10 Jun 2015, 08:17.
