           </OverlayTrigger>
         </Col>
         <Col xs={4}>
-          回复：<span id={"deck-condition-countdown-#{@props.deckIndex}-#{@componentId}"}>{resolveTime @countdown}</span>
+          回复：<span id={"deck-condition-countdown-#{@props.deckIndex}-#{@componentId}"}>{resolveTime @maxCountdown}</span>
         </Col>
       </Grid>
     </Alert>
 
 PaneBody = React.createClass
-  shouldComponentUpdate: (nextProps, nextState)->
+  condDynamicUpdateFlag: false
+  getInitialState: ->
+    cond: [0, 0, 0, 0, 0, 0]
+  onCondChange: (cond) ->
+    condDynamicUpdateFlag = true
+    @setState
+      cond: cond
+  shouldComponentUpdate: (nextProps, nextState) ->
     nextProps.activeDeck is @props.deckIndex
+  componentWillReceiveProps: (nextProps) ->
+    if @condDynamicUpdateFlag
+      @condDynamicUpdateFlag = not @condDynamicUpdateFlag
+    else
+      cond = [0, 0, 0, 0, 0, 0]
+      for shipId, j in nextProps.deck.api_ship
+        if shipId == -1
+          cond[j] = 49
+          continue
+        ship = _ships[shipId]
+        cond[j] = ship.api_cond
+      @setState
+        cond: cond
+  componentWillMount: ->
+    cond = [0, 0, 0, 0, 0, 0]
+    for shipId, j in @props.deck.api_ship
+      if shipId == -1
+        cond[j] = 49
+        continue
+      ship = _ships[shipId]
+      cond[j] = ship.api_cond
+    @setState
+      cond: cond
   render: ->
     <div>
       <TopAlert
+        updateCond={@onCondChange}
         messages={@props.messages}
         deckIndex={@props.deckIndex}
         deckName={@props.deckName} />

    decks = window._decks
    @messages = getDeckMessage decks[@props.deckIndex]
    tmp = getCondCountdown decks[@props.deckIndex]
    @countdown = tmp.countdown
    if tmp.cond isnt @cond
      @timeDelta = 0
      @cond = tmp.cond
    if @countdown > 0
      @interval = setInterval @updateCountdown, 1000 if !@interval?
    else
      @interval = clearInterval @interval if @interval?
  componentWillUpdate: ->
    @setAlert()
  updateCountdown: ->
    flag = true
    if @countdown - @timeDelta > 0
      flag = false
      @timeDelta += 1
      # Use DOM operation instead of React for performance
      if @isMount
        $("#ShipView #deck-condition-countdown-#{@props.deckIndex}-#{@componentId}").innerHTML = resolveTime(@countdown - @timeDelta)
      if @countdown is @timeDelta and not @inBattle and window._decks[@props.deckIndex].api_mission[0] <= 0
        notify "#{@props.deckName} 疲劳回复完成", {icon: join(ROOT, 'assets', 'img', 'operation', 'sortie.png')}
    @interval = clearInterval @interval if flag
  componentWillMount: ->
    @componentId = Math.ceil(Date.now() * Math.random())
    @setAlert()


getCondCountdown = (deck) ->
  {$ships, $slotitems, _ships} = window
  countdown = [0, 0, 0, 0, 0, 0]
  cond = [49, 49, 49, 49, 49, 49]
  for shipId, i in deck.api_ship
    if shipId == -1
      countdown[i] = 0
      cond[i] = 49
      continue
    ship = _ships[shipId]
    # if ship.api_cond < 49
    #   cond[i] = Math.min(cond[i], ship.api_cond)
    cond[i] = ship.api_cond
    countdown[i] = Math.max(countdown[i], Math.ceil((49 - cond[i]) / 3) * 180)
  ret =
    countdown: countdown
    cond: cond
