Upcoming Release: Forge version 1.5.58
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Upcoming Release: Forge version 1.5.58
by friarsol » 03 Jan 2017, 14:16
Are you sure that's new? I know the AI should do those things but I'm not sure if enough AI code was setup to make sure M2 wasn't passed if +Loyalty abilities were still available.Agetian wrote:I noticed rather recently that the AI sometimes "forgets" to use the + ability on a planeswalker even though there is no drawback to doing so, and will instead do nothing at all. For example, a common place to see it is AI casting Saheeli Rai and not doing anything at all with it on the first turn (though there is no drawback to +1'ing her). I've seen the same happen with at least several other planeswalkers that are all marked AI playable. Does anyone know what's going on?
- Agetian
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Upcoming Release: Forge version 1.5.58
by Agetian » 03 Jan 2017, 15:19
Hmm I seem to recall that I haven't seen so many missed opportunities in the past, though maybe I was just playing with different planeswalkers back then, who knows At any rate, I'll see if I can somehow improve that later.
- Agetian
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Upcoming Release: Forge version 1.5.58
by Hanmac » 03 Jan 2017, 15:24
@Agetian you might checkout the Parts with has Random. Probably isn't it just not happen often enough? Might add the part to scryAI that treat the PW Ability different.
(Maybe some general case for PW (+) abilitites? )
(Maybe some general case for PW (+) abilitites? )
Re: Upcoming Release: Forge version 1.5.58
by Hanmac » 05 Jan 2017, 08:15
Did some more fixes with damage Replacement. Add new option for DamageTarget should be used with damage redirection or split damage.
The logic behind that is that damage can only be redirected or split if the other target is a creature or planeswalker in play or a Player in play.
My non commited tests does pass for my non commited card changes. I hope i got it finish until weekend.
The logic behind that is that damage can only be redirected or split if the other target is a creature or planeswalker in play or a Player in play.
My non commited tests does pass for my non commited card changes. I hope i got it finish until weekend.
Re: Upcoming Release: Forge version 1.5.58
by Hanmac » 05 Jan 2017, 18:12
@Agetian: i did see your changes about Donate and Illusions of Grandeur
we might think about doing a DonateMe variable like for SacMe and DiscardMe? to make it better for the AI?
we might think about doing a DonateMe variable like for SacMe and DiscardMe? to make it better for the AI?
Re: Upcoming Release: Forge version 1.5.58
by Agetian » 05 Jan 2017, 18:30
Yep, sounds like a plan! I'll go ahead and do thatHanmac wrote:@Agetian: i did see your changes about Donate and Illusions of Grandeur
we might think about doing a DonateMe variable like for SacMe and DiscardMe? to make it better for the AI?
EDIT: Done. Thanks for the suggestion, Hanmac! As a side note, sadly, haven't found a way to get a list of valid cards as CardCollection other than calling .threadSafeIterable() inside a call to CardsList.filter, is there a better way of handling that? :/
I mean this call:
- Code: Select all
Card donateTarget = ComputerUtil.getCardPreference(ai, sa.getHostCard(), "DonateMe", CardLists.filter(ai.getCardsIn(ZoneType.Battlefield).threadSafeIterable(), CardPredicates.hasSVar("DonateMe")));
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Upcoming Release: Forge version 1.5.58
by Hanmac » 05 Jan 2017, 19:57
@Agetian hm i need to check, but i don't know if there is a better way to get a CardCollection other than creating one.
i committed some changes for PumpAI. it does improve your changes for DonateAI more. now working with multiple opponents.
i also commited my changes for MoveCounter AI ... but i didnt commited the cards yet which should use that because its not finish yet. (guys feel free to extend it)
i committed some changes for PumpAI. it does improve your changes for DonateAI more. now working with multiple opponents.
i also commited my changes for MoveCounter AI ... but i didnt commited the cards yet which should use that because its not finish yet. (guys feel free to extend it)
Re: Upcoming Release: Forge version 1.5.58
by Agetian » 05 Jan 2017, 20:07
Thanks a lot for your contribution, Hanmac! Much appreciated!
- Agetian
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Upcoming Release: Forge version 1.5.58
by Hanmac » 06 Jan 2017, 17:50
While working though the damage modification cards i noticed Ajani Steadfast (it uses replace prevention)
And that I need to overwork PreventDamage too. (With moving parts to GameEntity if able)
While that I will add a DamagePrevented Trigger for Selfless Squire.
And that I need to overwork PreventDamage too. (With moving parts to GameEntity if able)
While that I will add a DamagePrevented Trigger for Selfless Squire.
Re: Upcoming Release: Forge version 1.5.58
by Xitax » 07 Jan 2017, 03:55
Here are Masters Editions edition files and booster pics. Please let me know if I goofed anything up!
- Attachments
-
- masters_edition_defs.zip
- (273.45 KiB) Downloaded 228 times
Re: Upcoming Release: Forge version 1.5.58
by Agetian » 07 Jan 2017, 04:47
These look really good, Xitax! Should we maybe set their type to Online though (instead of Reprint) since they are MTGO only? (both Vintage Masters and Tempest Remastered are Type=Online)Xitax wrote:Here are Masters Editions edition files and booster pics. Please let me know if I goofed anything up!
I'll commit them unless there are objections from anyone else and once this is discussed.
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Upcoming Release: Forge version 1.5.58
by Hanmac » 07 Jan 2017, 10:30
I commited the best patch of my damage changes.
moved preventDamage to GameEntity and refactor it a bit.
no need to have the same code in Card and Player.
i added TriggerDamagePrevented, with that Selfless Squire can be coded.
currently i didn't updated the cards yet on that place like i need to for Ajani Steadfast, but the tests does all pass and the cards should work like before.
PS: i did changed the order in preventDamage how the different parts are applied. i thought it now makes more sense (ShieldEffect after Static and ReplacementEffects)
moved preventDamage to GameEntity and refactor it a bit.
no need to have the same code in Card and Player.
i added TriggerDamagePrevented, with that Selfless Squire can be coded.
currently i didn't updated the cards yet on that place like i need to for Ajani Steadfast, but the tests does all pass and the cards should work like before.
PS: i did changed the order in preventDamage how the different parts are applied. i thought it now makes more sense (ShieldEffect after Static and ReplacementEffects)
Re: Upcoming Release: Forge version 1.5.58
by disferente » 09 Jan 2017, 01:39
AI pays 0 mana to unmanifest.
- disferente
- Posts: 11
- Joined: 21 Dec 2016, 11:50
- Has thanked: 0 time
- Been thanked: 1 time
Re: Upcoming Release: Forge version 1.5.58
by Agetian » 09 Jan 2017, 05:03
A little question: does anyone know what exactly is preventing Plague of Vermin from being scripted? Looks like Forge already supports effects like "Starting with you, each player..." and "Repeat this process until no one" (e.g. Hypergenesis), as well as token creation. Is there anything in particular that is not possible at the moment? (just curious)
- Agetian
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Upcoming Release: Forge version 1.5.58
by Hanmac » 09 Jan 2017, 05:52
@Agetian the problem was the counting how many each player did pay. I don't think we have the right fuctions yet.
Who is online
Users browsing this forum: No registered users and 77 guests