It is currently 29 Apr 2024, 01:49
   
Text Size

Bug Reports (snapshot builds)

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Bug Reports (snapshot builds)

Postby 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.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: Bug Reports (snapshot builds)

Postby 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.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 30 Jul 2016, 14:09

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
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 30 Jul 2016, 14:24

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?
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby 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)

Postby 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.
Last edited by Hanmac on 30 Jul 2016, 19:04, edited 1 time in total.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby 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
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Bug Reports (snapshot builds)

Postby 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.
stormcat
 
Posts: 361
Joined: 17 Jun 2015, 05:32
Has thanked: 0 time
Been thanked: 6 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 30 Jul 2016, 19:06

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)
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby 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.
Attachments
1.jpg
stormcat
 
Posts: 361
Joined: 17 Jun 2015, 05:32
Has thanked: 0 time
Been thanked: 6 times

Re: Bug Reports (snapshot builds)

Postby 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
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby excessum » 31 Jul 2016, 02:38

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.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: Bug Reports (snapshot builds)

Postby 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.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby excessum » 31 Jul 2016, 07:58

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).
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: Bug Reports (snapshot builds)

Postby 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.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 84 guests


Who is online

In total there are 84 users online :: 0 registered, 0 hidden and 84 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 84 guests

Login Form