(א) אֵין הַמֶּלֶךְ נִלְחָם תְּחִלָּה אֶלָּא מִלְחֶמֶת מִצְוָה. וְאֵי זוֹ הִיא מִלְחֶמֶת מִצְוָה זוֹ מִלְחֶמֶת שִׁבְעָה עֲמָמִים. וּמִלְחֶמֶת עֲמָלֵק. וְעֶזְרַת יִשְׂרָאֵל מִיַּד צָר שֶׁבָּא עֲלֵיהֶם. וְאַחַר כָּךְ נִלְחָם בְּמִלְחֶמֶת הָרְשׁוּת וְהִיא הַמִּלְחָמָה שֶׁנִּלְחָם עִם שְׁאָר הָעַמִּים כְּדֵי לְהַרְחִיב גְּבוּל יִשְׂרָאֵל וּלְהַרְבּוֹת בִּגְדֻלָּתוֹ וְשִׁמְעוֹ:
(ב) מִלְחֶמֶת מִצְוָה אֵינוֹ צָרִיךְ לִטּל בָּהּ רְשׁוּת בֵּית דִּין. אֶלָּא יוֹצֵא מֵעַצְמוֹ בְּכָל עֵת. וְכוֹפֶה הָעָם לָצֵאת. אֲבָל מִלְחֶמֶת הָרְשׁוּת אֵינוֹ מוֹצִיא הָעָם בָּהּ אֶלָּא עַל פִּי בֵּית דִּין שֶׁל שִׁבְעִים וְאֶחָד:
(1) A priori, the king does not go to fight other than a War of Mitzvoh (Mandatory War). What is a War of Mitzvoh? This is the war against the Seven Nations or the war against Amalek or a war to help Israel at the hands of a צָר who after them. After this, he may fight Discretionary Wars which are those wars he conducts against the other nations in order to enlarge the borders of Israel, and increase his renown and reputation. He does not need to obtain permission from the Court to engage in a War of Mitzvoh but he may, at any time, on his own, compel the people to go out to war. However, he requires the authorization of the Court of Seventy-One to take the people with him go out to fight a Discretionary War.
ורבי יונתן בן שאול היא דתניא רבי יונתן בן שאול אומר רודף שהיה רודף אחר חבירו להורגו ויכול להצילו באחד מאבריו ולא הציל נהרג עליו
It is in accordance with the opinion of Rabbi Yonatan ben Shaul. As it is taught in a baraita: Rabbi Yonatan ben Shaul says: If a pursuer was pursuing another to kill him, and one was able to save the pursued party without killing the pursuer, but instead by injuring him in one of his limbs, but he did not save him in this manner and rather chose to kill him, he is executed on his account as a murderer.
מתני׳ הבא במחתרת נידון על שם סופו היה בא במחתרת ושבר את החבית אם יש
MISHNA: A burglar who is found breaking into a house may be killed by the owner of the house with impunity (see Exodus 22:1). He too is sentenced on account of his ultimate end,
(ט) כָּל אִילַן סְרָק מֻתָּר לָקֹץ אוֹתוֹ וַאֲפִלּוּ אֵינוֹ צָרִיךְ לוֹ. וְכֵן אִילַן מַאֲכָל שֶׁהִזְקִין וְאֵינוֹ עוֹשֶׂה אֶלָּא דָּבָר מוּעָט שֶׁאֵינוֹ רָאוּי לִטְרֹחַ בּוֹ מֻתָּר לָקֹץ אוֹתוֹ. וְכַמָּה יְהֵא הַזַּיִת עוֹשֶׂה וְלֹא יְקֻצֶּנּוּ. רֹבַע הַקַּב זֵיתִים. וְדֶקֶל שֶׁהוּא עוֹשֶׂה קַב תְּמָרִים לֹא יְקֻצֶּנּוּ:
(י) וְלֹא הָאִילָנוֹת בִּלְבַד. אֶלָּא כָּל הַמְשַׁבֵּר כֵּלִים. וְקוֹרֵעַ בְּגָדִים. וְהוֹרֵס בִּנְיָן. וְסוֹתֵם מַעְיָן. וּמְאַבֵּד מַאֲכָלוֹת דֶּרֶךְ הַשְׁחָתָה. עוֹבֵר בְּלֹא תַשְׁחִית. וְאֵינוֹ לוֹקֶה אֶלָּא מַכַּת מַרְדּוּת מִדִּבְרֵיהֶם:
(9) It is permitted to cut down a non-fruit-bearing tree even if the tree itself is not needed. Similarly, an old fruit-bear tree which only produces a small yield and is not worth the effort to maintain can be cut down. And how much olive yield must an olive tree produce for it not to be cut down? A quarter of a Kav of olives. A palm tree which produces a Kav of dates may not be cut down.
(10) And not only regarding trees, but even one who destructively breaks vessels or rips up clothing or tears down a building or seals up a spring or wastes food violates the Negative Commandment of “Do not destroy”. However, he only receives stripes for disobedience, in accordance with the Rabbis.
רש"י דברים פרשת שופטים פרק כ
(י) כי תקרב אל עיר - במלחמת הרשות הכתוב מדבר, כמו שמפורש בענין (פסוק טו) כן תעשה לכל הערים הרחוקות וגו':
Rashi Commentary on Deuteronomy
When you come close to the city- The verse refers to an optional war, as is explicitly stated later (in verse 15) "so shall you do to all the cities which are distant..."