INNER CODE UNIT · C

trainState

acoto87/war1 · src/war_ai.c:213

                                WarStateTrain* trainState = wst_createTrainState(context, entity, unitType, (f32)stats->buildTime, stats->goldCost, stats->woodCost, command);
                                return wst_resetState(context, entity, (WarStateBase*)trainState, WAR_TRANSITION_CAUSE_AI_ORDER);
                            }

                        }
                    }
                }
            }
        }

        // if there is no building to train the unit or all of them are busy
        // let the request live to try again later
        return false;
    }

    if (wu_isBuildingUnitType(unitType))
    {
        // find a free worker

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…