Bug Reports (snapshot builds)
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Bug Reports (snapshot builds)
by excessum » 29 Jul 2016, 12:57
r31768
The AI is skipping the second Escalate cost when selecting all three options for spells like Collective Brutality (discard one card instead of two) and Collective Effort (tap one instead of two). The logs shows that it discards the same card twice for Collective Brutality.
The AI is skipping the second Escalate cost when selecting all three options for spells like Collective Brutality (discard one card instead of two) and Collective Effort (tap one instead of two). The logs shows that it discards the same card twice for Collective Brutality.
Re: Bug Reports (snapshot builds)
by excessum » 30 Jul 2016, 14:00
r31813
Attacking with Impetuous Devils does not allow the human player to choose "up to one target creature", the human is forced to choose at least one target instead. It seems to be working properly for the AI though.
Attacking with Impetuous Devils does not allow the human player to choose "up to one target creature", the human is forced to choose at least one target instead. It seems to be working properly for the AI though.
Re: Bug Reports (snapshot builds)
by Agetian » 30 Jul 2016, 14:09
Fixed (r31814).excessum wrote:r31813
Attacking with Impetuous Devils does not allow the human player to choose "up to one target creature", the human is forced to choose at least one target instead. It seems to be working properly for the AI though.
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Bug Reports (snapshot builds)
by Hanmac » 30 Jul 2016, 14:24
hm i did take a look but i didn't find the problem or a solution yet ...excessum wrote:r31768
The AI is skipping the second Escalate cost when selecting all three options for spells like Collective Brutality (discard one card instead of two) and Collective Effort (tap one instead of two). The logs shows that it discards the same card twice for Collective Brutality.
as someone who did some things in the ai part, can you look if you can fix that?
Re: Bug Reports (snapshot builds)
by fmartel » 30 Jul 2016, 14:58
Description: [In a commander game, Sacrificing an Eldrazi Spawn to pay cost of commander]
- NullPointerException | Open
- Code: Select all
Forge Version: 1.5.55-SNAPSHOT-r31813
Operating System: Windows 7 6.1 x86
Java Version: 1.8.0_45 Oracle Corporation
java.lang.NullPointerException
at forge.view.arcane.PlayArea.selectCard(PlayArea.java:577)
at forge.view.arcane.PlayArea.mouseLeftClicked(PlayArea.java:536)
at forge.view.arcane.CardPanelContainer$2.mouseReleased(CardPanelContainer.java:165)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
- fmartel
- Posts: 281
- Joined: 31 Dec 2013, 19:27
- Location: Québec City
- Has thanked: 8 times
- Been thanked: 4 times
Re: Bug Reports (snapshot builds)
by Hanmac » 30 Jul 2016, 18:40
@excessum: i did investigate he problem with the AI and non-Mana Escalate Cost.
the AI currently has problems to pay "Discard<1/Card> Discard<1/Card> Mana"
one way to fix it would be to convert it to:
"Discard<2/Card> Mana"
the AI can pay it, but i am not 100% sure if that is correct.
another way would be for it to select what cost it has already chosen to discard or to tap.
===
i am currently trying the complex way to get "Discard<1/Card> Discard<1/Card> Mana" working for the AI.
EDIT: i commited my fix for that ... it now prevents the AI from using the same card twice to pay a cost
but now i didn't get the ai to pay the cost even once ...
someone might look at over.
the AI currently has problems to pay "Discard<1/Card> Discard<1/Card> Mana"
one way to fix it would be to convert it to:
"Discard<2/Card> Mana"
the AI can pay it, but i am not 100% sure if that is correct.
another way would be for it to select what cost it has already chosen to discard or to tap.
===
i am currently trying the complex way to get "Discard<1/Card> Discard<1/Card> Mana" working for the AI.
EDIT: i commited my fix for that ... it now prevents the AI from using the same card twice to pay a cost
but now i didn't get the ai to pay the cost even once ...
someone might look at over.
Last edited by Hanmac on 30 Jul 2016, 19:04, edited 1 time in total.
Re: Bug Reports (snapshot builds)
by Agetian » 30 Jul 2016, 18:56
Something has indeed happened to the visualization of enchantments, especially for the AI player - not necessarily very recently, but recently enough. In all the recent builds, when the AI, for instance, controls Levitation and a bunch of creatures, Levitation seems to jump back and forth very quickly between the creature row (it seems) and the enchantment row. This happens in other circumstances too, I noticed it happening to awakened lands as well (not sure if it was in combination with some enchantment or not). Kind of annoying even though not functionally breaking...
- Agetian
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Bug Reports (snapshot builds)
by stormcat » 30 Jul 2016, 19:01
:r31819
Triskelion double trigger problem, I found a condition.
The problem only occur when Triskelion died by own ability.
Triskelion double trigger problem, I found a condition.
The problem only occur when Triskelion died by own ability.
Re: Bug Reports (snapshot builds)
by Hanmac » 30 Jul 2016, 19:06
oh ok thats a starting point i can look over.stormcat wrote::r31819
Triskelion double trigger problem, I found a condition.
The problem only occur when Triskelion died by own ability.
for that there need to be a global -1/-1 so it can die from that right?
(or even a -2/-2 to compensate the +1/+1 from Mikaeus, the Unhallowed
i will check it out later, or maybe tomorrow.
How to Reproduce:
- Code: Select all
Enemy Controls:
Elesh Norn, Grand Cenobite
Human Controls:
Mikaeus, the Unhallowed
Triskelion
my first idea was to add "AffectedZone$ Battlefield" to Mikaeus, but that doesn't seems to solve the problem. (its more correct, but does not help it)
Re: Bug Reports (snapshot builds)
by stormcat » 30 Jul 2016, 19:22
@Hanmac
Triskelion's ability can target own.
For example, After Undying, Triskelion has four counters.
Two counters use target player, and two counters target Triskelion.
Triskelion's ability can target own.
For example, After Undying, Triskelion has four counters.
Two counters use target player, and two counters target Triskelion.
Re: Bug Reports (snapshot builds)
by Hanmac » 30 Jul 2016, 19:36
@stormcat: it does not care if Triskelion does target itself.
i could reproduce it with all of the abilities targeting the Player.
now i need to understand why the trigger does happen this way.
===
found a way to fix it: OncePerEffect works XD
i could reproduce it with all of the abilities targeting the Player.
now i need to understand why the trigger does happen this way.
===
found a way to fix it: OncePerEffect works XD
Re: Bug Reports (snapshot builds)
by excessum » 31 Jul 2016, 02:38
I think CostPayment.payComputerCosts() is the issue. "Map<CostPart, PaymentDecision> decisions" which is the actual payment matrix does not allow duplicate entries for "Discard a card" or "Tap" so the second entry overrides the first. Modifying CostAdjustment or Cost to merge the duplicate entries into discard/tap two should fix this without requiring the changes since r31820.Hanmac wrote:@excessum: i did investigate he problem with the AI and non-Mana Escalate Cost.
the AI currently has problems to pay "Discard<1/Card> Discard<1/Card> Mana"
one way to fix it would be to convert it to:
"Discard<2/Card> Mana"
the AI can pay it, but i am not 100% sure if that is correct.
another way would be for it to select what cost it has already chosen to discard or to tap.
===
i am currently trying the complex way to get "Discard<1/Card> Discard<1/Card> Mana" working for the AI.
EDIT: i commited my fix for that ... it now prevents the AI from using the same card twice to pay a cost
but now i didn't get the ai to pay the cost even once ...
someone might look at over.
Re: Bug Reports (snapshot builds)
by Hanmac » 31 Jul 2016, 07:20
@excessum:
i was currently trying to investigate why the opponent does not choose any extra modes, but it seems your change in CharmAI does deactivate it :/
http://svn.slightlymagic.net/websvn/diff.php?repname=forge&path=%2Ftrunk%2Fforge-ai%2Fsrc%2Fmain%2Fjava%2Fforge%2Fai%2Fability%2FCharmAi.java&rev=31769&peg=31769
currently the AI does not even try to cast it with more modes.
(can you look at this?)
the for the payment matrix i will see if that is really a problem,
because the Parts should not be equal.
(but i still try to add the part with merging the cost parts)
Edit: i did the thing with the merging cost, my other edits before with counting the discard probably should still not reverted, because there might be different discard costs.
i need to checkout Drought, and cards that already has Sacrifice costs ...
probably i need the same thing that i did for CostDiscard for CostSacrifice too.
i was currently trying to investigate why the opponent does not choose any extra modes, but it seems your change in CharmAI does deactivate it :/
http://svn.slightlymagic.net/websvn/diff.php?repname=forge&path=%2Ftrunk%2Fforge-ai%2Fsrc%2Fmain%2Fjava%2Fforge%2Fai%2Fability%2FCharmAi.java&rev=31769&peg=31769
currently the AI does not even try to cast it with more modes.
(can you look at this?)
the for the payment matrix i will see if that is really a problem,
because the Parts should not be equal.
(but i still try to add the part with merging the cost parts)
Edit: i did the thing with the merging cost, my other edits before with counting the discard probably should still not reverted, because there might be different discard costs.
i need to checkout Drought, and cards that already has Sacrifice costs ...
probably i need the same thing that i did for CostDiscard for CostSacrifice too.
Re: Bug Reports (snapshot builds)
by excessum » 31 Jul 2016, 07:58
The AI does choose extra modes, but only if canPlayAi() (ie. the full AI logic rather than the usually more lenient trigger logic) goes through.Hanmac wrote:@excessum:
i was currently trying to investigate why the opponent does not choose any extra modes, but it seems your change in CharmAI does deactivate it :/
http://svn.slightlymagic.net/websvn/diff.php?repname=forge&path=%2Ftrunk%2Fforge-ai%2Fsrc%2Fmain%2Fjava%2Fforge%2Fai%2Fability%2FCharmAi.java&rev=31769&peg=31769
currently the AI does not even try to cast it with more modes.
(can you look at this?)
- Code: Select all
most "bonus" effects like life-gain and random pumps will
usually not be chosen. This is designed to force the AI to only select
the best choice(s)
Re: Bug Reports (snapshot builds)
by Hanmac » 31 Jul 2016, 08:10
hm i need to test this more, (you might try to test it too)
i did try to get him to use more modes for Collective Brutality, but AI only ever uses the -2/-2 one. (even if it has a DiscardMe card for the Lifedrain choice)
and it would be cool if we can get the AI using Borrowed Grace right too.
===
i think the best idea would be for CharmAI, that when a spell has Escalate, it should try to use most modes if able.
i did try to get him to use more modes for Collective Brutality, but AI only ever uses the -2/-2 one. (even if it has a DiscardMe card for the Lifedrain choice)
and it would be cool if we can get the AI using Borrowed Grace right too.
===
i think the best idea would be for CharmAI, that when a spell has Escalate, it should try to use most modes if able.
Who is online
Users browsing this forum: No registered users and 84 guests