Page 361 of 487

Re: Bug Reports (snapshot builds)

PostPosted: 29 Jul 2016, 12:57
by excessum
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.

Re: Bug Reports (snapshot builds)

PostPosted: 30 Jul 2016, 14:00
by excessum
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.

Re: Bug Reports (snapshot builds)

PostPosted: 30 Jul 2016, 14:09
by Agetian
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.
Fixed (r31814).

- Agetian

Re: Bug Reports (snapshot builds)

PostPosted: 30 Jul 2016, 14:24
by Hanmac
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.
hm i did take a look but i didn't find the problem or a solution yet ...

as someone who did some things in the ai part, can you look if you can fix that?

Re: Bug Reports (snapshot builds)

PostPosted: 30 Jul 2016, 14:58
by fmartel
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)

Re: Bug Reports (snapshot builds)

PostPosted: 30 Jul 2016, 18:40
by Hanmac
@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)

PostPosted: 30 Jul 2016, 18:56
by Agetian
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

Re: Bug Reports (snapshot builds)

PostPosted: 30 Jul 2016, 19:01
by stormcat
:r31819
Triskelion double trigger problem, I found a condition.
The problem only occur when Triskelion died by own ability.

Re: Bug Reports (snapshot builds)

PostPosted: 30 Jul 2016, 19:06
by Hanmac
stormcat wrote::r31819
Triskelion double trigger problem, I found a condition.
The problem only occur when Triskelion died by own ability.
oh ok thats a starting point i can look over.

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
now remove all +1/+1 counter from Triskelion, and with the last one, the UndyingTrigger does trigger twice. (but it should not)

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)

PostPosted: 30 Jul 2016, 19:22
by stormcat
@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.

Re: Bug Reports (snapshot builds)

PostPosted: 30 Jul 2016, 19:36
by Hanmac
@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

Re: Bug Reports (snapshot builds)

PostPosted: 31 Jul 2016, 02:38
by excessum
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.
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.

Re: Bug Reports (snapshot builds)

PostPosted: 31 Jul 2016, 07:20
by Hanmac
@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.

Re: Bug Reports (snapshot builds)

PostPosted: 31 Jul 2016, 07:58
by excessum
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?)
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.
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)
For example, the AI will almost always use all three choices for Collective Effort if the player has valid targets for the first two choices, and multiple creatures to benefit from the mass counters. Remember that the AI evaluates choices independently so it sees Borrowed Grace as two separate pump effects instead of a +2/+2 (eg. will never use both choices on a 1/1 to defeat a 2/2).

Re: Bug Reports (snapshot builds)

PostPosted: 31 Jul 2016, 08:10
by Hanmac
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.