Kishimen version 2.1
  • authors

    onigiri 59

  • downloads
    voxlap .vxl 2.23 MiB
    Download
    pyspades .txt 1.36 KiB
    Download
  • tags

    Water damage 🌊

  • text file
    name = 'Kishimen'
    version = '2.1'
    author = 'ONIGIRI'
    
    fog = (186, 160, 94)
    
    # script
    from pyspades.server import ServerConnection
    from pyspades.constants import *
    import random
    
    
    extensions = { 'water_damage' : 100 }
    
    def get_entity_location(team, entity_id):
        if entity_id == GREEN_FLAG:
            z = team.protocol.map.get_z(0, 0)
            return ( 0, 0, 50)
        if entity_id == GREEN_BASE:
            z = team.protocol.map.get_z(0, 0)
            return ( 381, 256, 50)
        if entity_id == BLUE_FLAG:
            z = team.protocol.map.get_z(0, 0)
            return ( 0, 0, 50)
        if entity_id == BLUE_BASE:
            z = team.protocol.map.get_z(0, 0)
            return ( 131, 256, 50)
    
    
    spawn_locations_blue = [
        ( 131, 256, 47),( 129, 292, 42),( 129, 237, 47),
    ]
    
    spawn_locations_green = [
        ( 381, 256, 47),( 381, 218, 42),( 381, 274, 47),
    ]
    
    def get_spawn_location(connection):
        if connection.team is connection.protocol.blue_team:
            x, y, z = random.choice(spawn_locations_blue)
        elif connection.team is connection.protocol.green_team:
            x, y, z = random.choice(spawn_locations_green)
        z -= 0 # magic numbers
        x += 0.5
        y += 0.5
        if connection.protocol.map.get_z(x, y) <= z:
            # allows spawning lower if the ground is destroyed
            return x, y, z
        else:
            return x, y, connection.protocol.map.get_z(x, y)