AI hints are entirely user defined. JPortal doesn't know anything about them. Well it provides the functionality, but otherwise JPortal is entirely ignorant of anything related to hints.
Hints can be created by the user. A hint or a collection of hints can be related to cards - this is why they are here in the card detail view of the set.
The AI can get hints for these cards and chose to react to them. But since the AI itself is entirely user defined. We have a "communication" of user defined settings and routines. JPortal hasn't got anything to do with them. You could use any other XML-Editor to create and relate them to cards.
Here a screenshort of the display:
AI Hints
Even if it is up to the user to define anything he wants... In order to have a basic AI delivered with JPortal a general implementation of hints was made.
I created numerous hints and related them to cards. It does make a whole lot of sense to "sort" hints and group them in some ways. I will go into this here - in the hope that someone who will provide new cards does not reenvent the wheel from ground but rather keep up in the same spirit (or better?).
A Hint consists of several parts, as there are:
a name
a name of a corresponding variable (which at the moment is allways exaclty the same as the name, which makes it quite redundant)
a type, one of: Integer, Boolean or String
a value - depending on the type
often for strings a use comma sperate values to support more than just one string, e.g. if something requires 4 colors, I will give a list like "W,R,G,B" - this works out quite well
a comment, what is this hint used for
Hints are not alone in the world. And usually you don't use a hint just once but often. In order to ensure some continuety - and to enable the AI to group cards with hints. Every hint must have a template bevor you can use it! A Template hint is a hint without a value. In the GUI you can enter a new template hint at the bottom line (4). After pressing the add-button it will appear as an entry in the corresponding combobox (3).
For one card a hint is unique. Meaning you can not add the same hint with different values to one card. If you think about it - it even doesn't make sense if you would be able to. If you ever find yourself in the need to enter the same hint with different values to your card - think hard again - and restructure your hints!
Detail Info (1)
Here is a small summary of the card detail. Same Info as in the other tabs.
The table
Business as usual. Here all hints for this card are displayed. To edit one row - double click it - and it will be set to the Hint edit area under (3). You can delete hint(s) by selecting them and using the delete selcted-Button.
Hint Editing (3)
Here you can select a template and fill in the value. If you like you can change the comment to be more specific for your current needs. After clicking the add-Button, the hint is added to the list of hints of that card. The hints are not saved yet!
Saving hints
To save the hints for this card press the SaveHints-Button (which I forgot to put a number next to...)
When
When can the card be played, or when does the effect of the card take effect? These hints are collected by hints with names starting with: EFFECT WHEN... Examples:
EFFECT WHEN ATTACKING, EFFECT WHEN DRAW CARD, EFFECT WHEN GRAVEYARD...
What area must be accessed
For the card to be successfull, these hints start with: FROM... Examples:
FROM OPPONENT CREATURE, FROM OPPONENT GRAVE, FROM OPPONENT HAND, FROM OPPONENT LAND...
FROM PLAYER CREATURE, FROM PLAYER GRAVE, FROM PLAYER LAND...
What is needed
For the card to be successfull, these hints start with a player description (PLAYER, OPPONENT a further describtion - and end with NEED. Examples:
PLAYER LAND NEED, PLAYER CREATURE NEED, PLAYER CREATURE GRAVE NEED, ...
OPPONENT TAPPED CREATURE NEED, OPPONENT ATTACKER NEED, OPPONENT LAND NEED...
What is happening to whom?
These hints start all with EFFECT, than a part which describes the target: ONE (either player), PLAYER or OPPONENT and than a describtion what kind of action is happening. Examples:
EFFECT PLAYER HEAL, EFFECT PLAYER HAND TO GRAVE, EFFECT PLAYER CREATURE TO GRAVE, EFFECT PLAYER CREATURE TOUGHNESS ADD...
EFFECT OPPONENT HAND TO GRAVE, EFFECT OPPONENT DAMAGE, EFFECT ONE LAND TO GRAVE...
Restrictions
Restrictions on cards effected all start with CARD and go on with what is restricted. Ending with either NEEDED or MUST NOT Examples:
CARD ABILITIES MUST NOT, CARD COLORS NEEDED...
Others
Just look at the hints allready in service... :-)