Skip to content

Commit

Permalink
Update scripts to handle Daybreak CACs
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil committed Jun 28, 2017
1 parent 3f7e069 commit fbde75d
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 2 deletions.
49 changes: 48 additions & 1 deletion BSG Moderator Template/Basic/Standard/BoardStatus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,15 @@ sub Board_SetSpecial (effect as string)
case "The Guardians"
offseth = 7
offsetv = -4
case "Lockdown"
offseth = 7
offsetv = -6
case "Hornet's Nest"
offseth = 7
offsetv = -7
case "Event Horizon"
offseth = 7
offsetv = -2
case else
foundeffect = FALSE
end select
Expand Down Expand Up @@ -516,7 +525,31 @@ sub Board_ClearSpecial (which as string)
LogThis "Special: The Guardians are no longer in effect."
end if
end if

if BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-6).String <> "" then
BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-6).String = ""
BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-6).CellBackColor = _white
if which <> "All" then
MsgBox "Special: Lockdown is no longer in effect."
LogThis "Special: Lockdown is no longer in effect."
end if
end if
if BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-7).String <> "" then
BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-7).String = ""
BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-7).CellBackColor = _white
if which <> "All" then
MsgBox "Special: Hornet's Nest is no longer in effect."
LogThis "Special: Hornet's Nest is no longer in effect."
end if
end if
if BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-2).String <> "" then
BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-2).String = ""
BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-2).CellBackColor = _white
if which <> "All" then
MsgBox "Special: Event Horizon is no longer in effect."
LogThis "Special: Event Horizon is no longer in effect."
end if
end if

if which = "All" then
BoardSheet.GetCellByPosition(_DetectorCol,_DetectorRow).String = ""
BoardSheet.GetCellByPosition(_DetectorCol,_DetectorRow).CellBackColor = _white
Expand Down Expand Up @@ -563,6 +596,20 @@ sub Board_ClearSpecial (which as string)
MsgBox "Special: Dogfight is no longer in effect."
LogThis "Special: Dogfight is no longer in effect."
end if
elseif which = "Lockdown" then
if BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-6).String <> "" then
BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-6).String = ""
BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-6).CellBackColor = _white
MsgBox "Special: Lockdown is no longer in effect."
LogThis "Special: Lockdown is no longer in effect."
end if
elseif which = "Hornet's Nest" then
if BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-7).String <> "" then
BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-7).String = ""
BoardSheet.GetCellByPosition(_SpecialsCol+7,_SpecialsRow-7).CellBackColor = _white
MsgBox "Special: Hornet's Nest is no longer in effect."
LogThis "Special: Hornet's Nest is no longer in effect."
end if
end if
end sub

Expand Down
10 changes: 9 additions & 1 deletion BSG Moderator Template/Basic/Standard/Ships.xml
Original file line number Diff line number Diff line change
Expand Up @@ -841,9 +841,13 @@ sub SetShipStatus (shiptype, shipid, ByVal targetstatus, optional seldamage as s
exit sub
elseif targetstatus = _ShipStatusDestroyed then
Board_ClearSpecial("Thirty-Three")
Board_ClearSpecial("Lockdown")
Board_ClearSpecial("Hornet's Nest")
targetstatus = _ShipStatusOffBoard
elseif targetstatus = _ShipStatusRemoved then
Board_ClearSpecial("Thirty-Three")
Board_ClearSpecial("Lockdown")
Board_ClearSpecial("Hornet's Nest")
targetstatus = _ShipStatusDestroyed
end if
end if
Expand Down Expand Up @@ -932,6 +936,10 @@ sub SetShipStatus (shiptype, shipid, ByVal targetstatus, optional seldamage as s
end if
if shiptype =_ShipCivilian or shiptype =_ShipBasestar then
Board_ClearSpecial("Thirty-Three")
if shiptype =_ShipBasestar then
Board_ClearSpecial("Lockdown")
Board_ClearSpecial("Hornet's Nest")
end if
end if
else
ShipSheet.GetCellByPosition(ShipCol(ShipType, _ShipColDestroyed), ShipRow(ShipType) + ShipID).string = ""
Expand Down Expand Up @@ -2111,4 +2119,4 @@ function RepairVipers (shiptype as integer, shipcnt as integer)
next i
end function

</script:module>
</script:module>

0 comments on commit fbde75d

Please sign in to comment.