Ejemplo n.º 1
0
def DoorOpenGeneric(sentence):
    '\n    This rule enforces that a door that has been locked to a specific\n    mission team may only be opened by them.\n    '
    playerkey = sentence.subject.MissionKey
    if ((playerkey != mv.NON_ASSIGNABLE_MISSIONKEY)
            and (not mv.ValidMissionKeyBaseMatch(
                sentence.directObject.MissionKey, playerkey))):
        return
    sentence.result = SUCCESS
Ejemplo n.º 2
0
def CardKeyTest(sentence):
    '\n    This rule simply returns success\n    '
    if (not mv.ValidMissionKeyBaseMatch(sentence.subject.MissionKey,
                                        sentence.directObject.MissionKey)):
        return
    if HasMissionKeyItem(sentence, discovery.getGameObjectType('CardKey')):
        sentence.result = SUCCESS
        return
Ejemplo n.º 3
0
def ComputerInfect(sentence):
    '\n    Succeed if we have a computer virus which\n    matches our mission key.\n    '
    if (not mv.ValidMissionKeyBaseMatch(sentence.subject.MissionKey,
                                        sentence.directObject.MissionKey)):
        return
    if HasMissionKeyItem(sentence,
                         discovery.getGameObjectType('Computer Virus')):
        sentence.result = SUCCESS
        return
Ejemplo n.º 4
0
def ComputerHack(sentence):
    "\n    Hack client rule always succeeds if this is the player's mission;\n    server rule does more validation.\n    "
    sentence.result = FAILURE
    if (not mv.ValidMissionKeyBaseMatch(sentence.subject.MissionKey,
                                        sentence.directObject.MissionKey)):
        return
    sentence.result = SUCCESS
    return
    if sentence.subject.abilities[HackerAbility]:
        sentence.result = SUCCESS
        return
Ejemplo n.º 5
0
def CanFollowClient(subject, directObject):
    if mv.ValidMissionKeyBaseMatch(subject.MissionTeam.MissionKey,
                                   directObject.MissionElement.MissionKey):
        return True
    return False