исправь код: import os
import re
from pathlib import Path


def extract_text_from_txt(filepath):
    try:
        with open(filepath, 'r', encoding='utf-8') as file:
            text = file.read()
            # Ищем начало основного текста (после оглавления).
            start_index = text.find("1. TURN OVERVIEW")
            if start_index != -1:
                text = text[start_index:]
            return text
    except Exception as e:
        print(f"Ошибка при извлечении текста из файла: {e}")
        return None


def split_text_into_sections(text):
    # Регулярное выражение для поиска всех заголовков (включая подзаголовки)
    pattern = re.compile(r'(\d+.\d*\s+[A-Z][^\n]*|[1]+(?:\n+|\Z))', re.MULTILINE)

    # Разделение текста на секции на основе заголовков
    sections = []
    last_index = 0
    current_heading = ""
    for match in pattern.finditer(text):
        if last_index != 0:
            heading = text[last_index:match.start()].strip()
            if heading:
                sections.append((current_heading.strip(), heading))
        current_heading = match.group().strip()
        last_index = match.start()
    last_section = text[last_index:].strip()
    if last_section:
        sections.append((current_heading.strip(), last_section))  # Добавление последнего раздела

    return sections


def generate_chatgpt_prompts(sections):
    prompts = {}
    for i, (title, body) in enumerate(sections):

        if not body:
            print(f"Предупреждение: Раздел '{title}' не содержит текста.")
            continue

        if 'карты' in title.lower():
            prompt = f"Опиши формат данных для карт в игре Babylon5 CCG, используя этот текст: {body}"
        elif 'правила' in title.lower():
            prompt = f"Используя этот текст, обобщи и опиши основные правила игры Babylon5 CCG: {body}"
        else:
            prompt = f"Создай соответствующий программный код на Python, используя этот текст: {body}"

        cleaned_title = clean_filename(f"{i + 1}{title}")
        prompts[cleaned_title] = f"{title}\n\n{body}"
    return prompts


def clean_filename(filename):
    return re.sub(r'[/?:"<>|\n]', "", filename).strip()


def save_prompts_to_files(prompts, output_dir):
    if not os.path.exists(output_dir):
        os.makedirs(output_dir)

    for section, prompt in prompts.items():
        filename = f"{section[:50].replace(' ', '')}.txt"  # Ограничиваем длину имени файла и заменяем пробелы на подчеркивания
        filepath = os.path.join(output_dir, filename)
        try:
            with open(filepath, 'w', encoding='utf-8') as f:
                f.write(prompt)
        except OSError as e:
            print(f"Ошибка при сохранении файла {filepath}: {e}")


if __name__ == "__main__":
    filepath = Path("game_rules.txt")  # Замените на путь к вашему текстовому файлу
    txt_text = extract_text_from_txt(filepath)
    if txt_text:
        sections = split_text_into_sections(txt_text)
        chatgpt_prompts = generate_chatgpt_prompts(sections)
        save_prompts_to_files(chatgpt_prompts, "prompts")
        print("Промпты успешно сохранены в папку 'prompts'.")
    else:
        print("Не удалось извлечь текст из файла.") вот пример текста:  BABYLON 5 CCG 
Table of Contents 
1. Turn Overview 
2. Ready Round 
2.1 Ready Cards 
2.2 Restore Influence 
2.3 Determine Initiative 
3. Conflict Round 
3.1 Declare Conflicts 
3.2 Reveal and Initiate Conflicts 
4. Action Round 
4.1 Using an effect which requires rotating 
4.2 Playing cards without rota ting (Events, Contingencies) 
4.3 Building Influence 
4.4 Sponsoring 
4.5 Promoting 
4.6 Replacing a Character 
4.7 Supporting or Opposing / Participation 
4.8 Attacking / Damage 
4.9 Healing / Neutralized 
4.10 Leading a Fleet 
4.11 Repairing Fleets & Locations 
4.12 Discarding, Playing, Replacing & Revealing Agendas 
4.13 Offering Influence to a Mercenary 
4.14 Passing 
5. Resolution Round 
5.1 Resolve Current Conflict 
5.2 Play Aftermath Cards 
5.3 Discarding Conflicts & Aftermaths 
6. Draw Round 
6.1 Discarding Neutralized Supporting Cards 
6.2 Discarding Cards From Hand 
6.3 Drawing Cards 
6.4 Victory Check 
6.5 End Of Turn 
7. Card Details 
7.1 Aftermath 
7.2 Agenda 
7.3 Character 
7.4 Conflict 
7.5 Contingency 
7.6 Enhancement 
7.7 Event 
7.8 Fleet 
7.9 Group 
7.10 Location 
8. Additional Rules 
8.1 Tensions & Unrest 
8.2 Influence Rating 
8.3 Playing "Fast and Loose" and Resolving Timing Disputes 
8.4 Triggered Effects / Effects with Duration 
8.5 Votes 
8.6 States 
8.7 War 
8.8 Unconditional Surrender 
8.9 Legal Targets 
8.10 Marks 
8.11 Discards 
8.12 Bonuses and Blanking 
8.13 Cumulative Effects 
9. Alternate Factions 
9.1 League of Non-Aligned Worlds 
9.2 Home Factions 
9.3 Psi Corps Faction 
9.4 Captured Locations 
9.5 Power & Victory – Optional Rule 
9.6 The Drakh 
9.7 The Interstellar Alliance 
10. Glossary 
11. Tournament Rules 
12. Card Rulings 
 BABYLON 5 CCG 
 
1. TURN OVERVIEW 
The game is played in turns. Each turn is sub-divided into rounds. In each round, ev ery player acts simultaneously. This means 
that each player may perform any and all allowable game activitie s within that round before an yone may proceed to the next 
round. During some other rounds, where some players may wish to see what another player does before completing their play, 
play can also proceed in initiative order, though, again, all players will act within each round.  
Each turn, play progresses through the following rounds:  
READY  
CONFLICT  
ACTION  
RESOLUTION  
DRAW  
Each game turn ends after the victory check, which is the last step in the Draw Round. A new turn then begins with the Ready 
Round until one player claims victory. Note that some rounds are further broken down into individual steps (see below). As 
with rounds, all players must complete all activities with in a step before play progresses to the next step.  
• No step in the turn sequence is voluntary. For instance, you cannot voluntarily skip the 
victory check in order to try to win a major victory by getting 10 or more power than another player. 
 
2. READY ROUND 
 
2.1 Ready Cards (Step 1): 
Any cards which are rotated (set on their side, to show that they acted during the last turn) are now made ready (set upright) 
again.  
Ready and Rotated Cards  
Most cards may only act (rotate) once per tu rn. Cards set upright are referred to as 'Ready' to act. During each turn, especial ly 
in the Action Round, cards may perform various actions that require them to rotate. Once a card is rotated, it may not take any  
action that requires it to rotate later in the same turn. Note: A ready but neutralized card is only considered ready for heali ng 
actions. It may not be used to sponsor a card or be targeted by  cards that require their target to be ready, unless they also 
specify the target can be a neutralized card. 
Sustained Actions  
A player may choose to leave a card he controls rotated, to show that it is continuing the same action. This is known as 
Sustaining an action. This is usually done with a card which may rotate to provide a bonus to another card. E.g., a player may 
rotate a Character with Leadership to incr ease the Military rating of one of his fleets. If he wishes to leave that Character i n 
charge of that fleet, he need not ready the Character, and the fleet continues to r eceive the boost to its Military rating (pos sibly 
keeping it from being discarded). For convenience, you may wish to place cards that are sustaining with the cards they modify (or vice versa). If a card which provides a bonus until the end of  the turn sustains its action, there is no "gap" during which  the 
bonus expires before being renewed (this is  occasionally relevant for de termining whether or not a card becomes neutralized). 
To determine whether an action can be sustained, there are a few guidelines. To be sustainable, an action must have no other 
cost besides rotating a card - there should be no influence cost, no marks need to be purged, etc. In addition, the action shou ld 
provide a bonus to a card's ability. However, any effect which st ates that it lasts while a card remains rotated can be sustain ed.  
• Sustaining can only be done if: There was no cost for the action to be sustained other than 
rotating the card in question. All necessary requirements for the initiator and the target are still fulfilled. The action being sustained increases an ability of a Character or fleet or the text “while rotated” is on the sustaining card. Also, there is no end of turn gap in the effect. Any ability that is being aided is continuously aided, even if the card providing the aid has the phrase "until the end of the turn" on it. 
• A sustainable effect is automatically sustained if the Character/Group cannot ready. 
 
2.2 Restore Influence  (Step 2): 
All influence that was applied last turn is restored and moved back above each player's ambassador card to show that it is once  
again available. Each player should now have as available influence his entire Influence Rating.  
 
2.3 Determine Initiative  (Step 3): 
Initiative order for the turn is now determined. Players are ranke d by Influence Rating. The player with the lowest Influence 
Rating must act first during each round, followed by the second lowest, and so on. Thus, the player with the most influence act s 
last in the turn, letting him see the initial actions of his oppon ents before making his decisions. If two players are tied in 
influence, the player with the highest Diplomacy on his ambassador wins (acts last). Further ties are resolved by comparing the  
ambassadors' Intrigue, Psi, then, if necessary, Leadership. If two players are still tied, determine initiative order between t hem 
randomly.  
 BABYLON 5 CCG 
• When determining initiative, you take into account damage to the ambassador for the 
purposes of comparing abilities. If two ambassadors are neutralized (i.e. all abilities considered to be 0) you determine initiative randomly. Amount of severe damage does not matter for this determination. You can sustain with an assistant to increase the ambassador's abilities for initiative determination, though you cannot do this to a neutralized ambassador. 
 
3. CONFLICT ROUND 
 
3.1 Declare Conflicts (Step 1): 
During this step, each player (in initiativ e order) may declare one Conflict. To d eclare a Conflict, place a Conflict card face  
down. Players with the option to declare Conflicts by other means, such as by using an Agenda, may do so now. Obviously, 
Conflicts declared in this fashion are im possible to conceal. Influence applied to in itiate an Agenda Conflict is placed on top of 
the Agenda. This makes it clear to all players that the Agenda-based Conflict has been initiated. 
• You can never target yourself with a Conflict. [Exception: Euphrates Treaty] If the 
Conflict provides a benefit to you without directing an effect at an opponent, it will not 
have you select a target. 
• If a player may initiate a Conflict of any type, they may initiate a Leadership Conflict. 
• When players are in the Conflict Round, they get one and only one chance to declare a 
Conflict. Play does not proceed as in the Action Round wherein it ends only when everyone passes in a row. 
• A Conflict, once generated, is separate from the card that generated it. 
 
3.2 Reveal and Initiate Conflicts  (Step 2): 
After all players have decided whether or not to declare a Co nflict, reveal all face-down Co nflicts. The Conflicts are now 
initiated (in the same sequence in which they were declared). To do so, any further required details (such as the target of the  
Conflict) must be declared at this time.  
• If two players select the same unique Conflict, the second copy is discarded for no effect when revealed. 
  
4. ACTION ROUND 
A player may only perform one action at a time. The player with the lowest initiative acts first. Then the player with the next  
lowest initiative becomes eligible to perform one action, and so  on, until all players have acted once. The player with the 
lowest initiative is then eligible to take  a second action and the cycle repeats as many times as necessary. A player may pass as 
his action at any time. Play continues in this fashion until a ll players have passed consecutively. A player who passes may act  
later in the Action Round, unless the round has ended. Once every player has passed in a row, the Action Round ends 
immediately. Reminder: A rotated Character may not rotate to take another action.  
• You may play cards that say "Since your last action" on effects that occurred during 
Resolution Round as your first action of the next Action Round. 
• When a card allows you to use one ability as another, this may only be done for purposes of 
participating in conflicts, attacking, or (when using an ability as Leadership) for leading a fleet. 
• While a Crusade Pile may appear similar to a "deck", it is not an actual deck for rules purposes. When you are instructed to draw cards, search your deck, shuffle your deck, etc., you do so with your normal deck of cards, not your Crusade Pile. Only a card that refers specifically to your Crusade Pile can affect it. 
• After searching or looking through your deck, always reshuffle unless otherwise instructed by a card. 
• A card that does not have an orange cost bubble in the lower right hand corner has a cost 
that is undefined  as far as other cards are concerned. Undefined  does not mean zero . It is 
impossible to apply an undefined  amount of influence or purge an undefined  number of marks. 
Cards that do not refer to cost specifically can target other cards with undefined costs.  
Performing an action consists of doing anything that requires you to play or rotate a card, or to apply influence. Note that an y 
action which requires a card to rotate, or to  be ready, requires the card to be both ready and unneutralized, unless otherwise 
specified. Actions that may be taken include: 
 
4.1 Using an effect which requires rotating:  
Many cards can provide a special effect when  they are rotated. You may rotate cards that you have in play to activate these 
effects. E.g., Vir Cotto may rotate to in crease Londo's abilities. Thus you can take an action to improve Londo's abilities by 
rotating Vir. 
 
 BABYLON 5 CCG 
4.2 Playing cards without rotating (Events, Contingencies): 
Playing an Event or Contingency card requires an action. Some Event cards are played along with  another action, as specified 
on the card. A Contingency card is played face down under another card you control (unless otherwise specified, of course). 
Events and Contingencies do not require rotating unless they specifically state so on the card. 
• You can play multiple Events of the same type on a Character in the same turn, e.g. Popular 
Support. 
 
4.3 Building Influence: 
Any faction with an Influence Rating of 9 or less may increase its Influence Rating by 1 by rotating a member of its Inner 
Circle and applying 3 influence. A new influence token is immediately added to the available influence above that faction's 
ambassador card. Factions with an Influence Rating of 10 or greater may not use this action.  (Though a one-time occurrence, 
this is a protected action, not an influence "gain".)  
• You can perform the build action more than once per turn, provided you have a ready Inner 
Circle Character and 3 unspent influence. 
• Temporary influence (e.g. A Moment of Beauty) does not change your Influence Rating. So if temporary influence causes you to have more than ten influence, you can still build.  
 
4.4 Sponsoring: 
Any Character in the Inner Circle may rotate to bring a new supporting Character, Enhancement,  Group, Location or Fleet into 
play from your hand. The new supporting card is placed in the Supporting Cards Row, ready to act on the same turn. Your 
faction must apply the required influence cost listed on the sp onsored card being brought into play or this action may not be 
performed. Exception: Enhancements might be placed in either the Inner Circle or  the Supporting Cards Row depending on 
their target. Sponsoring Cards with a Race Type. Cards with a r ace type different from the faction you control may require an 
increased influence cost to bring into play, or may not be play ed at all: * Characters with a different race name written as pa rt 
of their card type require a faction to apply double the listed influence cost to sponsor. Neutral Characters may be sponsored by 
any race at no additional influence cost. * Restricted Enhancements may only be sponsored by a Character of the listed race, 
and may only enhance a card of that same race. * Any other type of  card with a race name as part of its card type is restricted  to 
that race; i.e., only the pl ayer controlling that race may play such cards.  
• If a card states that its effects depend on whether or not another card could be sponsored 
(i.e. Consultants, Conscription, Ranger Operations, Reservations, etc) you must be able to satisfy all state and mark requirements but do not need to have a ready Inner Circle Character or the necessary influence to actually sponsor the card. 
• For cards which say things like, "increase your unrest by 1 when sponsored" or "your ambassador gains a mark of type x when sponsored." It is not the cards that are the source, but the act of sponsoring. So if a card that has an effect like this is discarded, the effect from sponsoring it doesn’t change. 
• There is no minimum cost for sponsoring cards. In other words, you may have modifiers that 
reduce the cost for sponsoring a card, which reduce it to zero. You must still rotate an 
Inner Circle Character. 
• The phrase "Supporting Character" always refers to a character in the supporting row. The phrase "character which is supporting" always refers to a character supporting a conflict. 
• You may not sponsor any restricted cards (Groups, Fleets or Locations) unless you are the race named on the card unless specifically allowed by the card or another card in play. If no race is listed, then the card is Neutral and may be played by anyone at normal cost. 
 
4.5 Promoting: 
Any Character in the Inner Circle may rotate to promote a read y supporting Character into the Inner Circle. This is done by 
moving the target Character card from the supporting card row to the row of cards to the right of the Ambassador (the Inner 
Circle row). To successfully promote a supp orting Character, a faction must apply in fluence equal to the supporting Character's  
influence cost (again, doubled if the Character is loyal to a different race) plus one additional influence for each Character that 
is already a member of your faction's Inner Circle. E.g., if yo ur faction has an ambassador and one other member in its Inner 
circle, then to promote a Character with an influence cost of three would require a total of five influence to be applied. Note  
that a discount to the cost to sponso r a Character does not apply to promoti ng the Character unless specifically stated 
otherwise.  
• You cannot voluntarily demote Inner Circle Characters to reduce the cost to promote someone 
else. 
• If a card or Agenda reduces the cost to sponsor a Character, it does not also reduce the cost to promote them unless it specifically says it reduces cost to promote as well. 
• If a card is ready but neutralized it cannot be promoted. If an effect requires a Character 
to be ready, he must also be un-neutralized, with healing as the only exception.  
 
 BABYLON 5 CCG 
4.6 Replacing a Character: 
• If you replace a Character it does not come into play rotated, unless the card text states 
otherwise (Delenn Transformed), it comes in to play ready to act even if the Character it 
replaced has already been rotated or damaged. Replacing a Character counts as a action but 
it does not need an Inner Circle to rotate.  
• When a card says it may replace a Character, this means it does so for free. 
• When a Character is replaced, he is not discarded but removed from play. If a card says to act as if a Character had been replaced, the replaced Character is considered removed from the game. 
• If a Character is replaced, the new Character will only transfer any Enhancements, Marks, Contingencies or Aftermaths that have been played on the replaced Character if the card specifically states that it transfers those things. Anything that is not transferred is discarded and the replaced card is removed from play. 
• You may replace other player's Characters, with exceptions as printed on the cards. You do not have to pay to replace a card unless the card specifically states so. The player whose card is replaced gains control of the card replacing it.  
• If a card says “Must replace” that means that is the only way that card can enter play, it does not mean you have to replace. “May replace” means the card can replace another or be sponsored normally. 
• Any Enhancement that says, "when sponsored" or any Enhancement or Aftermath that said "when played" or "when this card enters play" or such would not renew their effects when transferred to a replacement Character.  
• Agendas (and any textual changes, granted marks or ability bonuses) are reapplied to a new 
Ambassador anytime the Ambassador position changes.   
 
4.7 Supporting or Opposing / Participation: 
Characters and fleets (and, in some cases, Lo cations) may rotate to either support or oppose a Conflict that has been initiated . 
Characters cannot normally use Military to support or oppose a Conflict. Only cards with a non-zero ability of the appropriate 
type may rotate to support or oppose a Conflict. E.g., a Char acter with 2 Diplomacy, 3 Intrigue, and no listed Psi ability (0 Psi) 
could neither support nor oppose a Psi Conflict. However they could support or oppose a Diplomatic or Intrigue Conflict. The 
total support and opposition for each Conflict is equal to the total relevant ability (as possibly modified by other cards in p lay) 
from cards rotated to either support or oppose those Conflicts. A Character, fleet or Location which supports or opposes a 
Conflict becomes a Participant in the Conflic t. A Character who supports or opposes a Conflict must designate the ability he is  
using in the Conflict (if there is any doubt).  
• You can retroactively boost the ability used in a Conflict. So, for example, rotating the 
assistant to increase the ambassador's abilities after the fact works fine.  What is not 
allowed is changing the ability that has already been applied. During resolution, the total impact (as of the end of the turn) is assessed. 
• A Fleet can be lead, after it has already rotated to support (or oppose) a Conflict. 
• "Participation Restrictions" are any restrictions (on a Conflict, generally) that limit which cards may participate (limiting races or factions) or what manner of participation (support/oppose/attack) they may have. The Conflict type is not considered a participation restriction in this sense. "Any side may participate" Conflicts (which don't have opposition) are not considered restricted, either. 
• Any Conflict with participant restrictions (i.e. Border Raid) can have cards rotate to 
provide support or opposition for the Conflict as long as the rotating cards do not become 
participants (e.g. Support Fleets).  
 
4.8 Attacking / Damage: 
Cards may rotate to attack another card that has previously rota ted to either support, oppose, or attack during a current Confl ict 
(but not a Character who particip ated by leading a participant fl eet). This does not necessarily represent a direct physical at tack 
on the target. Often an "attack" reflects s ubtle or non-violent measures designed to undermine a target's effectiveness. Covert  
operations and diplomatic mudslinging are examples of non-physical attacks. Still, when a fleet attacks another fleet the 
confrontation is very much physical - lives and ships will probably be lost in the struggle!  
When an attack is declared, the attacking card becomes (and must  be eligible to become) a Participant in the Conflict. E.g., if  a 
Conflict is restricted to Minbari Characters,  no Narn could attack any participant involved in the Conflict. The attacking card  
must attack with the same ability the target has applied within the current Conflict (e.g., Intrigue must be used to attack a 
Character who supported a Conflict using Intrigue). Cards cannot a ttack if the ability that will be used to make the attack is 
zero. Neutralized cards (see "The Effects of Damage" below)  may not be attacked. You can not attack a card in your own 
faction.  
 BABYLON 5 CCG 
• Attacker vs. defender. (Defending against an attack is not an attack by the defender). If 
you are defending in an attack, you are not eligible for effects that refer to an attacker, such as PPG Rifle. 
• Normally you can only attack Fleets that are participating in Conflicts. However you can attack a Fleet being led by Jha'Dur and you can attack using your Expeditionary Fleet if 
tension is high enough.  
• Neutralized Characters cannot be attacked. 
• “Neutralized in the Conflict” This means being neutralized during a turn in the Action 
Round in which an attack takes place where the attack was permitted because the target of the attack was a participant in said Conflict. 
• If a Character (such as Tu'Pari) has enough damage to reduce an ability to 0 he cannot use that ability to attack. 
Resolving Attacks: 
Both cards (the attacker and the target) in flict Damage to each other equal to thei r current ability rating. Any card with a St rife 
Mark adds two points to the amount of damage it inflicts during an attack for each such mark po ssessed. Each point of damage 
inflicted to a card should be marked by placing a damage token on top of the affected card.  
The Effects of Damage:  
For each point of damage on a target, the target's abilities ar e immediately reduced by one. No ability may be reduced below 
zero. If a card has received less total dama ge than its greatest ability then it remains unneutralized . It can apply its effect s as 
normal and its abilities as modified by the damage. If a card takes damage equal to or greater than its highest ability rating,  
then the card is Neutralized. A card must have at least 1 point of damage to become neutralized.  
Neutralized cards are flipped over and a number of damage tokens equal to the amount required to neutralize the card are 
removed from play. For each point of damage beyond the number re quired to neutralize a card, a to ken is placed on the back of 
the card. These tokens are referred to as Severe Damage tokens. The only time normal damage is converted to severe damage is 
in the act of neutralizing a card. Additional normal damage wh ich is somehow applied to an already neutralized card has no 
additional effect.  
Note that a card with abilities that are improved by other cards in play might become neutralized or severely damaged at any time that such bonuses expire.  
Note also that cards which Sustain their action from a previous turn provide a continuous bonus, i.e., their bonus does not 
expire between turns.  
Whenever a fleet is neutralized, any Character who has rotated to  add their Leadership ability to that fleet is also automatica lly 
neutralized (flipped over). Howeve r, Characters neutralized in this fashion do not receive any severe damage as a result of 
damage applied to the fleet they modify.  
Any card which is neutralized during a turn may not take any more  actions during that turn, even if it is somehow repaired or 
readied during the turn. Supporting cards will be discarded at the end of the turn if they are still neutralized.  
A neutralized card is not considered read y for cards which require the target to be  ready unless the card specifically states 
otherwise. If a card has an ongoing effect on game play, or provides marks, the effect is not interrupted by neutralization, an d 
the marks are still present in that card's faction.  
 
4.9 Healing / Neutralized: 
Characters who are face up and ready may rotate to remove all damage on that Character. Inner Circle cards which are 
neutralized may rotate to remove one severe damage token, or to be flipped back face-up if no severe damage tokens remain on 
the card (removing any remaining normal damage tokens which may have somehow been applied). No other neutralized card 
may normally rotate to heal. If all of a player's Inner Circle Characters rotate to heal on th e same turn, then the player's 
ambassador is fully healed (placed  face-up with no damage or severe damage to kens) at the end of th e Action Round. A player 
may rotate undamaged Character(s) in this case, to represent them providing aid to their ambassador.  
• Neutralized Characters are treated as having all their abilities at 0. Any Marks they have 
may be counted in their faction. They remain as participants in Conflicts they were involved in when they became neutralized and are legitimate targets for Aftermath’s. They may not be attacked. They may take no action except from healing and this is forbidden on 
the turn they become neutralized. They may still be the target of Conflicts, Events, 
Aftermaths, Enhancements, and Contingencies. 
• If a Character's abilities are reduced to zero with an Event card (not through attacks or damage), nothing happens. You must have taken at least 1 damage to be neutralized. 
• Things that must target a ready Character cannot target a neutralized Character. 
• A card is not automatically flipped over when all severe damage tokens are removed. If a card has one severe damage they can rotate to remove it. Now they have no damage tokens but are still neutralized and must wait until the next turn to flip the card over as an action and become unneutralized. 
• If a Character's abilities were boosted until the end of the turn and they were attacked 
and received more damage than their highest ability (without temporary modifiers) but less 
 BABYLON 5 CCG 
than their boosted ability they would be neutralized and receive severe damage tokens equal 
to the amount by which their normal damage exceed their highest ability (including permanent modifiers). If the attack was bad enough that they were neutralized and received severe damage, this damage would not increase at the end of the turn when the boost expires. Severe damage is not affected by changes in a Character's abilities. 
• If a Character becomes unneutralized by healing, and is readied by Shal Mayan or Hour of 
the Wolf etc; his whole range of actions are open to him again, but only if he was not 
neutralized (in the first place) on that same turn. 
• Leading a neutralized Fleet will not change its zero abilities or take away severe damage tokens that have already happened. 
• If an Inner Circle Character has some damage and is neutralized by an effect (For My People for example), the normal damage tokens are discarded because the neutralized state is worse than non-severe damage that can be ignored. 
• In order to use the rule for healing the ambassador by rotating Inner Circle Characters. All Inner Circle Characters must rotate in the same turn, but not the same action. Each Character rotates on his own as an action. If, at the end of the Action Round, all Inner 
Circle Characters did so, the ambassador is fully healed and placed face up. 
• If there is only the ambassador in the Inner Circle, he can he still rotate to remove all 
damage. 
• If any Inner Circle Character is neutralized, they can still rotate to help heal the ambassador. Plus they get the benefits of healing themselves as well (normal healing). 
• In general if you play a card that enhances an ability of a neutralized card the Enhancement applies, but does not un-neutralize the card, so the card's effective abilities are still 0 until it is healed. 
• If a Character is neutralized, his effects text is still valid. For example, if Justin is 
neutralized, Lost Aftermaths can still not target you. 
• A character cannot rotate to heal unless a) the character is damaged or b) the character is 
in the Inner Circle and is rotating to help heal a neutralized Ambassador. 
• A card cannot take *any* additional actions the turn it becomes neutralized. 
• If a participant character that was neutralized is somehow healed, that character is still participating in the same conflict in the same way as before (i.e. supporting or opposing). 
 
4.10 Leading a Fleet: 
A Character with Leadership ability may rotate to add their Lead ership ability to the Military ability of one of your faction's  
fleets. The fleet's Military ability is increased by the Character 's Leadership ability for as long as the Character leads the fleet. 
Each fleet can only be led by one Character at a time. To keep the playing field organized, you may wish to Group fleets with 
the Character leading them (since fleets may not become Inner Circle Characters, there should be no confusion as to which 
cards are in the Inner Circle).  
• If a Character is leading a Fleet but not rotated or neutralized he is still classed as ready, but if he had to rotate or sustain to lead the Fleet....you'd have to ready him with a card. 
• You can add a leader to a neutralized Fleet. It does not un-neutralize the Fleet, and the Fleet still has 0 Military.  
• You cannot attack Characters leading a Fleet in a Conflict. The only Characters that may be 
attacked are those who have previously rotated to either support, oppose, or attack during 
a current Conflict. Leading a Fleet is none of these (even though the Character becomes a Conflict participant by doing it). 
 
4.11 Repairing Fleets & Locations: 
A non-neutralized Fleet or a Location that is damaged may repair any amount of damage. To repair a fleet or Location rotate 
the card and apply one influence per damage token removed. A repair action does not un-neutralize a fleet or Location, or remove severe damage.  
• If a Location is neutralized, it is discarded during the Draw Round like any other 
neutralized supporting card. 
• If the Leadership a Character is providing to a Fleet is keeping that Fleet from being neutralized, he would need to sustain his leading of the Fleet in the next round until such time as the damage on the Fleet was repaired to be less than its Military ability. 
 
4.12 Discarding, Playing, Replacing & Revealing Agendas: 
Each faction may only have one Agenda in play at any given tim e. To discard an Agenda alread y in play is considered an 
action. To bring a new Agenda into play requires you to rotate a Character of your Inner Circle an d is also considered to be an  
action. This Agenda may be brought into  play face-down, as a hidd en Agenda. You may reveal your hidden Agenda as an 
 BABYLON 5 CCG 
action; if the Agenda is one you could not sponsor at that  time, it is discarded instead.  You may replace your Agenda, 
removing your old Agenda from the game and replacing it with a new Agenda from your hand that you can sponsor. You 
cannot discard a Major Agenda, and can only replace it with another Major Agenda. You cannot replace an Agenda with a 
hidden Agenda.  
• If you replace an Agenda that says gain a Mark or +2 increase etc. to an ability then those 
gains are lost, but if it says do X and get Y then those gains are kept, since they are a 
bonus for completing the action. 
• If an Agenda grants you influence or an influence discount, you sponsor a card using the influence or take advantage of the discount and you then discard the Agenda, you lose any granted influence from the spent influence and do not have to make up for any previously granted discounts from unspent influence. 
• Sponsoring requirements are still in effect for sponsoring hidden Agendas. You must meet all requirements both when sponsoring the Agenda, and when revealing it. 
• If you are sponsoring a hidden Agenda that does not require rotating, you may still choose not to rotate. 
• Here is an example to show a general rule: If you have Support of the Mighty providing you enough power to have greater than 20 power, you may replace Support of the Mighty with Vorlon Universe (which requires 20 power to sponsor). The general rule is this: If you are replacing Card A with Card B and Card A is helping fulfill requirements necessary to sponsor Card B, you may sponsor Card B even if you will not satisfy the requirements once Card B is in place. There is no lull time where Card A is out of play before Card B is in play where requirements are checked. Also, if Card A has a non-text prohibition on being replaced by Card B (i.e. Card A has a Vorlon Mark and Card B has a Shadow Mark), this does not prevent the replacement. Though there is no lull, there is no overlap either.  
 
4.13 Offering influence to a Mercenary: 
Some cards in the game may be used each turn only by the player who applies the most influence to control them. Such cards 
are called "Mercenaries". A faction may, as an action, apply in fluence as a "bid" to control a mercenary card for the current 
turn or to increase the amount of a previous bid. Mercenaries act after all players have passed, but before the beginning of th e 
Resolution Round. Their action is dictated by the faction wh ich applied the most influence during the turn (bids are 
cumulative) to control them.  
• If the Mercenary is in the Inner Circle, than the high bidder may spend 3 of his influence 
and rotate the Mercenary to build with it. 
• Mercenaries that are not specifically prohibited to in their text may attack as their action. If no one bids on a Mercenary, nobody may use them. 
 
4.14 Passing: 
A player may pass as his action at any time. He may take another action later in the round unless all players pass consecutivel y, 
ending the Action Round.  
 
5. RESOLUTION ROUND 
Once all players have passed in a row , the Resolution Round begins. The following steps are carried out for each Conflict. 
The Conflict(s) initiated by the player with the lowest initiativ e order is resolved first, then any Conflict initiated by the next 
player, and so on. If one player initiated more than a single Co nflict (which is only possible th rough use of some cards) then he 
designates which of his Conflicts will be resolved first.  
 
5.1 Resolve Current Conflict  (Step 1): 
To resolve the current Conflict, add up the total ability (as modi fied by any cards, damage, or effects currently in operation)  
applied in support and compare it with the total applied in op position. Total modified support must exceed total modified 
opposition for th e Conflict to succeed; otherwise it fails.  
Once resolved, apply any effects dete rmined by the success or failure of the Conflict as written on the card.  
Note: a Character or fleet whose ability changed over the course of  the turn (e.g., due to an action card or by suffering damag e 
through an attack) applies his modified ability, not the ability he had when he originally supported the Conflict. Neutralized 
Characters apply no ability toward the Conflict. In addition, Conf licts which give a bonus to some or all participant Character s 
(for example, doubling their ability) have this bonus applied during resolution (these bonuses do not affect Characters during 
the Action Round, for attacks, etc.). An y cards whose effects are triggered by a Conflict resolving (for example, some 
Contingency cards or homeworlds) have their effect applied immediately after resolving the Conflict.  
• If two players each play Trade pact targeting each other. Assuming the first is resolved 
successfully, the second Conflict still resolves normally for Aftermath play but has no further effect (i.e. it is then discarded). 
 BABYLON 5 CCG 
• If a Conflict card states that the Shadows, Vorlons or Babylon 5 gain influence; regardless 
of whether the Conflict is successful or not, it is done during the Resolution Round, providing the Conflict has not been negated or in some way kept from resolving (see You Are Not Ready). The same is also true for tension/unrest changes and gaining Marks. 
• The total strengths supporting and opposing Conflicts are not fixed at the end of the 
Action Round, they continue to change as Conflicts are resolved. For example, a Kidnapping 
attempt can resolve, altering the totals for another Conflict. 
• If a Character's abilities have been boosted by an Event, Agenda or Enhancement and he is also the subject of a modifier such as half or double, total all the plus and minus modifier's taking into account any damage received. Whatever the total is then double or half it depending on the circumstances. E.G. Londo has a Diplomacy of 4, further modifiers give him another +2 but he has 1 damage (4+2-1 = 5). He is participating in Test Their Mettle so his Diplomacy is doubled to 10. 
• If a player supports a successful Conflict played by someone else, they do not gain any influence from it. Only the player initiating the Conflict gains the influence, unless the card text says otherwise, e.g. Humanitarian Aid. 
• As long as a Conflict has more support than opposition and is not canceled by some other means, it is a Won Conflict regardless of whether or not the target is there during resolution. 
 
5.2 Play Aftermath Cards  (Step 2): 
After the effects of the current Conflict ha ve been applied, all players have the opportunity to play any valid Aftermath cards  
they may have in their hands. Restrictions to Aftermath play are listed on the card. As is the case for any timing questions, i f 
more than one player wishes to play Aftermaths, play proceeds in initiative order, with each player having an opportunity to 
play one Aftermath or pass, until all players pass consecutively.  
Aftermath cards may normally be played only upon the faction that initiated the just resolved Conflict (the "Initiator"). 
However, if "Participant" is one of the Play Conditions, then appropriate Aftermath cards may target cards in play for any 
faction that either Supported, Opposed or Attacked during th e Conflict, not just the faction that initiated the Conflict. 
Aftermath cards that list "Won" or "Lost" as part of their ca rd type refer to whether the In itiator succeeded or failed in the 
Conflict. Conflicts in which a non-initiator "side" gains more s upport that the initiator's "side" are considered to have been 
"lost" by the Initiator. Many Aftermaths may also only be play ed if the Conflict was of a certain type, Military, Diplomatic, e tc.  
Example: An initiator's Diplomacy type Conf lict gives him an advantage if he can win with five more support than the total 
opposition. The initiator succeeds with only three more suppor t than opposition. Although falling short for purposes of the 
Conflict card's effect text, the initiator is still considered to have "won".  
Aftermath cards of the following types may be played on his faction: "Any Diplomacy", "Won Diplomacy", "Any Conflict", 
and "Won Conflict" (whether or not these Aftermath cards list "Participant" as one of their re strictions.) The text of an 
Aftermath may further limit the valid targets. It may, e.g., lim it it to "Characters who supported the Conflict" or "Characters  
who attacked during the Conflict".  
Although some Aftermath cards have immediate effects and are th en discarded, many are perman ent; they are placed with the 
card (or other target) they have been played on and remain in  play until some other card removes their effects. Only one of 
each named Aftermath may be in play on the same target. For eas e of viewing, it is suggested that an ambassador's Aftermath 
cards be laid out to the left of the Character. Aftermaths which occur and are then discarded should only be discarded at the e nd 
of the Aftermath step for that Conflict. Th erefore, a "discard after play" Aftermath can  only be played once on any given targe t 
for each Conflict.  
If an Aftermath does not specify its target, then it targets all cards (or factions, etc.) that it affects directly. For exampl e, an 
Aftermath which inflicts 1 point of damage on every partic ipant fleet targets all participant fleets in the Conflict.  
• Aftermaths should always be played in initiative order. 
• If you play an Aftermath card that changes a Character's abilities and they are 
participating in a Conflict that has not yet been resolved the bonus/penalty apply immediately. This is why Conflicts are resolved in initiative order. 
• When playing Aftermaths only the player that initiates a Conflict can be considered to have Won or Lost the Conflict. 
• In a Conflict where any player can be supported, the Conflict is considered as 'won' if the initiating player does not lose. If the initiating player did not win the Conflict, he is considered to have lost. 
• There is no limit to the number of Aftermaths that can be played on a single Conflict.  
However, only one of any given Aftermath can be affecting the same target at the same time. 
Aftermaths which are discarded after they affect the target are discarded at the end of Conflict resolution so they can only be played once per Conflict. 
 BABYLON 5 CCG 
Participants  
Any fleet that supports, opposes or attacks during a Conflic t becomes a "participant fleet".  Any Character who supports, 
opposes, attacks, or leads a fleet that participates  during a Conflict becomes a "participant Character".  
• Any replacement action, any effect which discards a card or removes it from play removes 
that participant from the Conflict and prevents it from making the Conflict contested (if the only participant on that side). 
 
5.3 Discarding Conflicts and Aftermaths (Step 3): 
If the Conflict was initiated through the use of a Conflict card, the card is now placed on the discard pile. Aftermath cards 
which are to be discarded after play are al so discarded at this time. If any unresolved Conflicts remain, after all players hav e 
played all of the Aftermath cards they wish to, resolve the next  Conflict. If not, then play proceeds to the Draw Round.  
• If an Agenda which allowed the initiation of a Conflict is removed during the action phase, the Conflict resolves normally. 
• Conflict cards are discarded once they have been used. The exception is where the Conflict 
text states the card can be re-used (e.g. Crusade). 
 
6. DRAW ROUND