Card-Forge / Card-Forge/forge

AI choose a wrong card to name with Pithing Needle

Open
#4,260 2 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)
158

Description

**Describe the bug**
When AI searches for Pithing Needle from Urza's Saga trigger, it puts Pithing Needle onto the battlefield and chooses the card name "Liliana of the Veil" if there are no other targets on the battlefield. Even if he's playing against a deck with no black.

**To Reproduce**
Steps to reproduce the behavior:
1. AI plays Urza's Saga
2. When Urza's Saga is sacrificed, AI searches for Pithing Needle and puts it onto the battlefield
3. Player doesn't have legal targets onto the battlefield to name with Pithing Needle
4. AI names "Liliana of the Veil"

**Expected behavior**
AI shouldn't names "Liliana of the Veil" or other wrong cards with Pithing Needle. If there aren't and haven't been any legitimate targets, then AI shouldn't be looking for the Pithing Needle from Urza's Saga trigger at all.

**Desktop**
OS: Windows 10
Java Version: 1.8.0_202-b08
Forge Version: 1.6.59-SNAPSHOT-12.01

**Screenshots**

![needle](https://github.com/Card-Forge/forge/assets/115870280/66f88fed-4817-4e76-88d8-4efce9bf62d2)
![needle2](https://github.com/Card-Forge/forge/assets/115870280/8ae39da4-6fd0-42ad-a33d-bfbbbbebc583)

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.