import numpy as np
import time

# calculate the effect landmarks have on player

#landmarkMod = landmarkBaseMod * itemContagion
#landmarks need to be changed to the array of nearby landmarks in range
def landmarkPressureInfluence(landmarkMod, effectiveMod, landmarks):
    if landmark in landmarks:
        #below logic needs to be changed
        if landmarks == blue:
            for landmark in landmarks:
                effectiveMod = 1 + effectiveMod + landmarkMod
                return effectiveMod
        #below logic needs to be changed
        if landmarks != blue:
            for landmark in landmarks:
                effectiveMod = effectiveMod - landmarkMod
                if effectiveMod > -0.75:
                    effectiveMod = 1 - effective
                    return effectiveMod
                elif effectiveMod <= -0.75:
                    effectiveMod = 1 - 0.75
                    return effectiveMod

# landmark growth rate
def landmarkResourceRate(itemResourceRate, itemImmunity, landmarkResources):
    if (300 - itemResourceRate) > 0:
        decayRate = (300 - itemResourceRate) * (1 + itemImmunity)
    elif (300 - itemResourceRate) <= 0:
        decayRate = 5
    while landmarkResources > 0:
        landmarkResources -= decayRate
        if (landmarkResources - decayRate) < 0:
            landmarkResources = 0
        # put in a delay of 60 seconds
    while landmarkResources < 0:
        landmarkResources += decayRate
        if (landmarkResources + decayRate) < 0:
            landmarkResources = 0
        # put in a delay of 60 seconds
    while landmarkResources == 0:
        landmarkResources


# don't know how we would classify people putting resources in
def landmarkCapture(landmarkResources, inputResources):
    if landmarkResources <= 0:
        print(landmarkResources)
        #landmarkTeam = None
        if inputResources > 0:
            #"landmark->team" = "player->team"
            landmarkResources = inputResources
            return landmarkResources
        # delay 120 seconds before sets neutral 1000 resources
        #if "landmark->team" = None:
            #return landmarkResources = 1000


647d2949eba5dc3ab23342a288831a010b4a1bd5
<mask token>

<mask token>


def landmarkPressureInfluence(landmarkMod, effectiveMod, landmarks):
    if landmark in landmarks:
        if landmarks == blue:
            for landmark in landmarks:
                effectiveMod = 1 + effectiveMod + landmarkMod
                return effectiveMod
        if landmarks != blue:
            for landmark in landmarks:
                effectiveMod = effectiveMod - landmarkMod
                if effectiveMod > -0.75:
                    effectiveMod = 1 - effective
                    return effectiveMod
                elif effectiveMod <= -0.75:
                    effectiveMod = 1 - 0.75
                    return effectiveMod


<mask token>


def landmarkCapture(landmarkResources, inputResources):
    if landmarkResources <= 0:
        print(landmarkResources)
        if inputResources > 0:
            landmarkResources = inputResources
            return landmarkResources

<mask token>


def landmarkPressureInfluence(landmarkMod, effectiveMod, landmarks):
    if landmark in landmarks:
        if landmarks == blue:
            for landmark in landmarks:
                effectiveMod = 1 + effectiveMod + landmarkMod
                return effectiveMod
        if landmarks != blue:
            for landmark in landmarks:
                effectiveMod = effectiveMod - landmarkMod
                if effectiveMod > -0.75:
                    effectiveMod = 1 - effective
                    return effectiveMod
                elif effectiveMod <= -0.75:
                    effectiveMod = 1 - 0.75
                    return effectiveMod


def landmarkResourceRate(itemResourceRate, itemImmunity, landmarkResources):
    if 300 - itemResourceRate > 0:
        decayRate = (300 - itemResourceRate) * (1 + itemImmunity)
    elif 300 - itemResourceRate <= 0:
        decayRate = 5
    while landmarkResources > 0:
        landmarkResources -= decayRate
        if landmarkResources - decayRate < 0:
            landmarkResources = 0
    while landmarkResources < 0:
        landmarkResources += decayRate
        if landmarkResources + decayRate < 0:
            landmarkResources = 0
    while landmarkResources == 0:
        landmarkResources


def landmarkCapture(landmarkResources, inputResources):
    if landmarkResources <= 0:
        print(landmarkResources)
        if inputResources > 0:
            landmarkResources = inputResources
            return landmarkResources

import numpy as np
import time


def landmarkPressureInfluence(landmarkMod, effectiveMod, landmarks):
    if landmark in landmarks:
        if landmarks == blue:
            for landmark in landmarks:
                effectiveMod = 1 + effectiveMod + landmarkMod
                return effectiveMod
        if landmarks != blue:
            for landmark in landmarks:
                effectiveMod = effectiveMod - landmarkMod
                if effectiveMod > -0.75:
                    effectiveMod = 1 - effective
                    return effectiveMod
                elif effectiveMod <= -0.75:
                    effectiveMod = 1 - 0.75
                    return effectiveMod


def landmarkResourceRate(itemResourceRate, itemImmunity, landmarkResources):
    if 300 - itemResourceRate > 0:
        decayRate = (300 - itemResourceRate) * (1 + itemImmunity)
    elif 300 - itemResourceRate <= 0:
        decayRate = 5
    while landmarkResources > 0:
        landmarkResources -= decayRate
        if landmarkResources - decayRate < 0:
            landmarkResources = 0
    while landmarkResources < 0:
        landmarkResources += decayRate
        if landmarkResources + decayRate < 0:
            landmarkResources = 0
    while landmarkResources == 0:
        landmarkResources


def landmarkCapture(landmarkResources, inputResources):
    if landmarkResources <= 0:
        print(landmarkResources)
        if inputResources > 0:
            landmarkResources = inputResources
            return landmarkResources

import numpy as np
import time

# calculate the effect landmarks have on player

#landmarkMod = landmarkBaseMod * itemContagion
#landmarks need to be changed to the array of nearby landmarks in range
def landmarkPressureInfluence(landmarkMod, effectiveMod, landmarks):
    if landmark in landmarks:
        #below logic needs to be changed
        if landmarks == blue:
            for landmark in landmarks:
                effectiveMod = 1 + effectiveMod + landmarkMod
                return effectiveMod
        #below logic needs to be changed
        if landmarks != blue:
            for landmark in landmarks:
                effectiveMod = effectiveMod - landmarkMod
                if effectiveMod > -0.75:
                    effectiveMod = 1 - effective
                    return effectiveMod
                elif effectiveMod <= -0.75:
                    effectiveMod = 1 - 0.75
                    return effectiveMod

# landmark growth rate
def landmarkResourceRate(itemResourceRate, itemImmunity, landmarkResources):
    if (300 - itemResourceRate) > 0:
        decayRate = (300 - itemResourceRate) * (1 + itemImmunity)
    elif (300 - itemResourceRate) <= 0:
        decayRate = 5
    while landmarkResources > 0:
        landmarkResources -= decayRate
        if (landmarkResources - decayRate) < 0:
            landmarkResources = 0
        # put in a delay of 60 seconds
    while landmarkResources < 0:
        landmarkResources += decayRate
        if (landmarkResources + decayRate) < 0:
            landmarkResources = 0
        # put in a delay of 60 seconds
    while landmarkResources == 0:
        landmarkResources


# don't know how we would classify people putting resources in
def landmarkCapture(landmarkResources, inputResources):
    if landmarkResources <= 0:
        print(landmarkResources)
        #landmarkTeam = None
        if inputResources > 0:
            #"landmark->team" = "player->team"
            landmarkResources = inputResources
            return landmarkResources
        # delay 120 seconds before sets neutral 1000 resources
        #if "landmark->team" = None:
            #return landmarkResources = 1000

