OBD talk:BINA/OBJC/CHAR: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 24: Line 24:


[[User:Gumby|Gumby]] 04:52, 31 August 2008 (CEST)
[[User:Gumby|Gumby]] 04:52, 31 August 2008 (CEST)
Here's the pseudocode of the function that decides who is friend/enemey. Friend/Foe have the obvious meaning and PotentialFoe means that the AI will act as a foe only if it is attacked.
  FriendOrFoe AI2rTeam_FriendOrFoe(Team t1, Team t2)
    if (LastManStanding)
        return Foe;
    else if (t1 = t2) or (t1 = Switzerland) or (t2 = Switzerland)
        return Friend;
    else if (t1 = Konoko)
        if (t2 = TCTF)
            return Friend;
        else if (t1 = Syndicate)
            return Foe;
        else
            return PotentialFoe;
    else if (t1 = TCTF)
        if (t2 = Konoko)
            return Friend;
        else if (t2 = Syndicate) or (t2 = RogueKonoko)
            return Foe;
        else
            return PotentialFoe;
    else if (t1 = Syndicate)
        if (t2 = SyndicateAccessory)
            return Friend;
        else
            return Foe;
    else if (t1 = Neutral)
        return PotentialFoe;
    else if (t1 = SecurityGuard)
        if (t2 = Syndicate) or (t2 = RogueKonoko)
            return Foe;
        else
            return PotentialFoe;
    else if (t1 = RogueKonoko)
        if (t2 = Syndicate) or (t2 = TCTF)
            return Foe;
        else
            return PotentialFoe;
    else if (t1 = SyndicateAccessory)
        if (t2 = Syndicate)
            return Friend;
        else
            return PotentialFoe;
[[User:Neo|Neo]]
708

edits