def action(self):
        # If PC has rolled the highest derived from Initiative they will have a number the options
        # At the moment the options are limited :

        gap()
        print("What action do you take")

        tuple = Sentence_Handler().scanner(Talihu_dict.Yalids_inn.actions,
                                           "action")  # Get sutiable Response

        # Fight : Start a fight
        if "fight" in tuple:

            self.fight = True

        # defuse: Attempt to descalate the situation - Will have to perform a skill check
        elif "defuse" in tuple:

            Checks().skill_check(('Persuasion', 'Hard', self.defuse, 'D20'))
Beispiel #2
0
#
#    This file is part of OraMon4PRTG.
#
#    OraMon4PRTG is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
#    OraMon4PRTG is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License along with OraMon4PRTG. If not, see http://www.gnu.org/licenses/.
#!/usr/bin/env python2.7

from Checks import Checks
from XMLTags import XMLTags
from config import TableSpaces as TableSpaces
if __name__ == "__main__":
    X = XMLTags()
    x = X.getData
    ChCk=Checks()
    ChCk.db_connect()
    TSGet = TableSpaces.get

    print x("PRT",
            X.ScU("Size of DLYTRN","MegaBytes",
                ChCk.ChkSize('DLYTRN')) +
            X.S3p("Count Rows of DLYTRN","Count",
                ChCk.ChkRows('DLYTRN')) +
            X.SFP("ASM DATA percent usage",
				ChCk.asm_volume_use('DATA')) +
			X.TblSpcs(TSGet('SYSTEM'),50))
    ChCk.db_close()

Beispiel #3
0
#    Copyright 2015 David Eugenio Perez Negron Rocha
#
#    This file is part of OraMon4PRTG.
#
#    OraMon4PRTG is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
#    OraMon4PRTG is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License along with OraMon4PRTG. If not, see http://www.gnu.org/licenses/.
#!/usr/bin/env python2.7

from Checks import Checks
from XMLTags import XMLTags
from config import TableSpaces as TableSpaces
if __name__ == "__main__":
    X = XMLTags()
    x = X.getData
    ChCk=Checks()
    ChCk.db_connect()
    TSGet = TableSpaces.get
	
    print "<prtg>"

    for keys,values in TableSpaces.items(): 
        print X.TblSpcs(TSGet(keys),ChCk.ChkTblSpace(keys)),
    print "</prtg>"
    ChCk.db_close()

    def encounter(self):

        start = Checks().initiative_check(
            self.NPC_Name)  # fight order determined

        if start == "PC":

            self.action()  # PC chooses to fight or defuse the situation

        if self.fight == True:  # fighting starts

            # Loop will run unitl a character's Hit Point is <= 0.
            while (PC["Stats"]["CHP"]["Current"] < PC["Stats"]["CHP"]["Max"]
                   ) and (NPC[self.NPC_Name]["Hit Points"]["Current"] <
                          NPC[self.NPC_Name]["Hit Points"]["Max"]):

                if start == "PC":  # PC will start the attack

                    self.PC_battle()  # PC's turn to attack

                    if NPC[self.NPC_Name]["Hit Points"]["Current"] >= NPC[
                            self.NPC_Name]["Hit Points"][
                                "Max"]:  # Checks if while loop condition is met for NPC
                        break

                    self.NPC_battle()  # NPC's turn to attack

                elif start == "NPC":  # NPC will start the attack

                    self.NPC_battle()

                    if PC["Stats"]["CHP"]["Current"] >= PC["Stats"]["CHP"][
                            "Max"]:  # Checks if will loop contion is met for PC
                        break

                    self.PC_battle()
            prompt()
            # Depending on who won the battle and how a differnt action will be called.
            if (PC["Stats"]["CHP"]["Current"] == PC["Stats"]["CHP"]["Max"]):
                print("You've fallen unconsious")
                outcome = Checks.death_saving_throw()

            elif (PC["Stats"]["CHP"]["Current"] > PC["Stats"]["CHP"]["Max"]):
                print("You've been killed")
                outcome = "PC Dead"

            elif (NPC[self.NPC_Name]["Hit Points"]["Current"] == NPC[
                    self.NPC_Name]["Hit Points"]["Max"]):
                print("You've  knocked {} unconsious".format(self.NPC_Name))
                outcome = "NPC Unconsious"

            elif (NPC[self.NPC_Name]["Hit Points"]["Current"] >
                  NPC[self.NPC_Name]["Hit Points"]["Max"]):
                print("You've killed {}".format(self.NPC_Name))
                outcome = "NPC Dead"

            return outcome

        elif self.fight == False:  # Fight was not intiated as 'action' resulted in a postive response.
            outcome = "Fight Disfused"
            return outcome