def add_story(self, adv_type=""): init = narrator.plots.PlotState(rank=self.party_rank()) nart = narrator.Narrative(self, init, adv_type=adv_type, start_rank=init.rank, end_rank=init.rank + 1) if nart.story: nart.build() return nart.story
def test_campaign_generator( screen ): camp = campaign.Campaign() for t in range( 100 ): nart = narrator.Narrative( camp, narrator.plots.PlotState(rank=t%5+1), adv_type="SHORTIE",start_rank=t%5+1, end_rank=5 ) #nart.build() print t for p in narrator.UNSORTED_PLOT_LIST: if p._used > 0: print "{} [{}]".format( p, p._used )
def add_story(self, adv_type=""): ''' adds story to current plot state, builds the narrative''' init = narrator.plots.PlotState(rank=self.party_rank()) nart = narrator.Narrative(self, init, adv_type=adv_type, start_rank=init.rank, end_rank=init.rank + 1) if nart.story: nart.build() return nart.story
def start_campaign( init, screen ): pygwrap.please_stand_by( screen, "Building world..." ) nart = narrator.Narrative( campaign.Campaign(), init ) if nart.story: nart.build() camp = nart.camp pcs = choose_characters( screen ) if pcs: camp.name = pygwrap.input_string(screen, redrawer=PosterRedraw(screen), prompt="Enter campaign name" ) camp.add_party( pcs ) camp.place_party() camp.play( screen )
def bardic_start_campaign( screen ): init = narrator.plots.PlotState(rank=1) pygwrap.please_stand_by( screen, "Building world..." ) nart = narrator.Narrative( campaign.Campaign(), init, adv_type="STUB_BARDIC", end_rank=5 ) if nart.story: nart.build() camp = nart.camp pcs = choose_characters( screen ) if pcs: camp.name = pygwrap.input_string(screen, redrawer=PosterRedraw(screen), prompt="Enter campaign name" ) camp.add_party( pcs ) camp.place_party() camp.play( screen )