Well, I wasn't writing the whole extended contest system in psuedocode, just the bit about edges.
> If (Defender must lose AP) then
> DAPLoss = (Bid + (OE - DE) ) * RX
> If (transfer) then
> AAPGain = DAPLoss
Ah, but you can only gain as many AP as the Defenders has positive, so then you need to check DAPLoss against DCAP (Defender's current AP) to see what AAPGain is.
If DAPLoss >= DCAP then
AAPGain = DCAP
else
AAPGain = DAPLoss
RR
Powered by hypermail