Card-Forge / Card-Forge/forge

AI activates some activated abilities as soon as it can with no reason

Open
#5,604 13 comments 0 reactions 1 assignee Claimed by @Agetian View on GitHub
AI keep
Dominant language
Java
Stars
2.7k
Forks
1.1k
Avg merge
1d 1h
Merged PRs (30d)
163

Description

**Describe the bug**
AI activates activated abilities of some cards as soon as it can with no reason. It's ineffectively.
Some of this cards:
- [x] Ugin's Labyrinth (second ability)
- [x] Canopy lands
- [x] Zuran Orb
- [ ] Skirk Prospector
- [x] Eladamri, Korvecdal
- [x] Pyrite Spellbomb
- [ ] Greater Gargadon
- [ ] Warden of the Inner Sky

**To Reproduce**
Steps to reproduce the behavior:
1. AI plays Ugin's Labyrinth
2. AI uses second ability of Ugin's Labyrinth immediately

or

1. AI play Fiery Islet and casts Ragavan, Nimble Pilferer
2. AI successfully attacks with Ragavan, Nimble Pilferer and takes Treasure token
3. AI sacrifices Fiery Islet and now it hasn't lands

or

1. AI casts Zuran Orb
2. AI sacrifices all of its lands immediately

or

1. AI has one untapped land
2. AI casts Skirk Prospector for land's mana
3. AI sacrifices Skirk Prospector and casts Aether Vial

or

1. AI has Eladamri, Korvecdal and 2 other little creatures
2. AI doesn't have big creatures in its hands and on top of its library
3. AI activates Eladamri, Korvecdal for nothing

or

1. AI has two untapped lands
2. AI casts Pyrite Spellbomb
3. AI sacrifices Pyrite Spellbomb and draw a card

or

1. AI suspends Greater Gargadon
2. AI plays land
3. AI sacrifices land at the end of it's turn

or

1. AI has 3 or 6 or 9 creatures, including Warden of the Inner Sky with 5 or more +1/+1 counters
2. Player hasn't enough big creatures
3. Before combat AI tapped Warden of the Inner Sky and other creatures and didn't attack

**Expected behavior**
AI should activate activated abilities of this and similar cards in accordance with the situation.
For example:
- AI activates second ability of the Ugin's Labyrinth only after it has enough mana to cast exiled card or in response to an attempt to destroy the Ugin's Labyrinth;
- AI sacrifices canopy lands only after it already has X lands and/or no cards in its hand
- I don't know, may be AI should activate the Zuran Orb ability when it has less than X life or when Titania, Protector of Argoth is on the battlefield
- AI doesn't sacrifice Skirk Prospector before it has 2+ lands and only for cast a spell with cmc = number of its lands + 1
- AI should activate Eladamri, Korvecdal if it has big creatures in its hands and on top of its library
- AI should sacrifice Pyrite Spellbomb and draw a card only if it hasn't cards in hands. Otherwise, AI should sacrifices Pyrite Spellbomb to deal fatal damage.
- AI should sacrifice artifacts, creatures and lands only if it's enough to remove all counters from Greater Gargadon or in response to the casting of Restore Balance, Balance, Balancing Act or activating an ability of Magus of the Balance (in this cases 1 counter must be saved)
- AI shouldn't tap Warden of the Inner Sky with a large number of +1/+1 counters. AI also needs to consider the number and size of opponent's creatures, does it need a blocker or not

**Additional context**
Similar with #4214

**Desktop**
- OS: Windows 10
- Java Version: 1.8.0_202-b08
- Forge Version: 1.6.64-SNAPSHOT-07-13

**Screenshots**

![labir](https://github.com/user-attachments/assets/711b8311-586b-4bb0-ae08-a76120d3bf7c)
![canopy](https://github.com/Card-Forge/forge/assets/115870280/f68d5c6c-5441-42ff-9880-061c1cdbd1bf)
![canopy2](https://github.com/Card-Forge/forge/assets/115870280/f114855b-ad36-472c-92cc-f8b39dcb8769)
![zuran](https://github.com/Card-Forge/forge/assets/115870280/ae692c2f-4850-47c9-8f71-e37ab9e71c6e)
![skirk](https://github.com/Card-Forge/forge/assets/115870280/f31d89b9-0080-4478-8c64-f9bcd52e85be)
![elad1](https://github.com/user-attachments/assets/2d6e6dbe-a614-456f-bbdc-234dc69a8379)
![elad2](https://github.com/user-attachments/assets/e466a817-bb50-4b6c-956c-97eeaa14995f)
![elad3](https://github.com/user-attachments/assets/371bc879-104b-453f-bae6-8ba0f90c9fee)
![pyri](https://github.com/user-attachments/assets/371afe22-d722-44ac-a113-68a8bb2163ab)
![Image](https://github.com/user-attachments/assets/604cb159-545d-446b-9355-16ca048a7e95)
![Image](https://github.com/user-attachments/assets/4777c1de-eeb6-4b6b-b5a6-b34a3c47a4b5)
![Image](https://github.com/user-attachments/assets/65b47b58-af7c-4ade-b069-3384a2b18441)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.